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

Unified Diff: src/org/adblockplus/libadblockplus/AdblockPlusException.java

Issue 6606493159784448: New JNI bindings (Closed)
Patch Set: Changed AppInfo to use builder pattern. Created April 11, 2014, 1:26 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/libadblockplus/AppInfo.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/org/adblockplus/libadblockplus/AdblockPlusException.java
diff --git a/jni/Utils.cpp b/src/org/adblockplus/libadblockplus/AdblockPlusException.java
similarity index 60%
copy from jni/Utils.cpp
copy to src/org/adblockplus/libadblockplus/AdblockPlusException.java
index b4c7cb60e982458591b1c75958a25b3f9c13912c..be88230e374c218cd7f75905fb53398f89524bea 100644
--- a/jni/Utils.cpp
+++ b/src/org/adblockplus/libadblockplus/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.libadblockplus;
-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/libadblockplus/AppInfo.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld