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: Cleaned up namespace usage in cpp files. Created March 20, 2014, 3:17 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..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;
Felix Dahlke 2014/03/28 08:29:00 We should be consistent with having a blank line b
René Jeschke 2014/03/28 10:59:15 Yes, a blank line here should be.
-#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);
+ }
}

Powered by Google App Engine
This is Rietveld