Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: src/org/adblockplus/android/api/AdblockPlusException.java

Issue 6606493159784448: New JNI bindings (Closed)
Patch Set: Added LICENSE, moved callback impls into cpp files. Created March 20, 2014, 3:12 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/org/adblockplus/android/JSEngine.java ('k') | src/org/adblockplus/android/api/AppInfo.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/org/adblockplus/android/api/AdblockPlusException.java
diff --git a/jni/Utils.cpp b/src/org/adblockplus/android/api/AdblockPlusException.java
similarity index 60%
copy from jni/Utils.cpp
copy to src/org/adblockplus/android/api/AdblockPlusException.java
index b4c7cb60e982458591b1c75958a25b3f9c13912c..eb104120bceaf9d0025b136d482336b6baa69f3b 100644
--- a/jni/Utils.cpp
+++ b/src/org/adblockplus/android/api/AdblockPlusException.java
@@ -14,25 +14,24 @@
* You should have received a copy of the GNU General Public License
* along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
*/
+package org.adblockplus.android.api;
-#include "Utils.h"
-#include "Debug.h"
-
-const std::string GetString(JNIEnv *pEnv, jstring str)
+public class AdblockPlusException extends RuntimeException
{
- D(D_WARN, "getString()");
-
- if (str == NULL)
- return std::string();
-
- jboolean iscopy;
-
- const char *s = pEnv->GetStringUTFChars(str, &iscopy);
- jsize len = pEnv->GetStringUTFLength(str);
-
- const std::string value(s, len);
-
- pEnv->ReleaseStringUTFChars(str, s);
-
- return value;
+ private static final long serialVersionUID = -8127654134450836743L;
+
+ public AdblockPlusException(final String message)
+ {
+ super(message);
+ }
+
+ public AdblockPlusException(final String message, final Throwable throwable)
+ {
+ super(message, throwable);
+ }
+
+ public AdblockPlusException(final Throwable throwable)
+ {
+ super(throwable);
+ }
}
« no previous file with comments | « src/org/adblockplus/android/JSEngine.java ('k') | src/org/adblockplus/android/api/AppInfo.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld