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: Reuploaded full diff Created March 28, 2014, 3:56 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
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..ec81245cb65ab928b5be1edbe64eb064d7462b9e 100644
--- a/jni/Utils.cpp
+++ b/src/org/adblockplus/android/api/AdblockPlusException.java
@@ -15,24 +15,24 @@
* along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "Utils.h"
-#include "Debug.h"
+package org.adblockplus.android.api;
-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);
+ }
}

Powered by Google App Engine
This is Rietveld