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); |
+ } |
} |