diff options
author | Koushik Dutta <koushd@gmail.com> | 2015-06-09 14:05:14 -0700 |
---|---|---|
committer | Koushik Dutta <koushd@gmail.com> | 2015-06-09 14:05:14 -0700 |
commit | e49bd233c187e3e754e96dc6481b6047bf98f112 (patch) | |
tree | 0dd0454d63d1f521c0cb29372f31451f5ef1ce1e /AndroidAsync | |
parent | 4114e9f37b0a52af345c5f2f238da783a888e2ee (diff) | |
download | AndroidAsync-e49bd233c187e3e754e96dc6481b6047bf98f112.tar.gz AndroidAsync-e49bd233c187e3e754e96dc6481b6047bf98f112.tar.bz2 AndroidAsync-e49bd233c187e3e754e96dc6481b6047bf98f112.zip |
215:
supress debug exceptions
Diffstat (limited to 'AndroidAsync')
-rw-r--r-- | AndroidAsync/AndroidManifest.xml | 4 | ||||
-rw-r--r-- | AndroidAsync/src/com/koushikdutta/async/Util.java | 7 |
2 files changed, 9 insertions, 2 deletions
diff --git a/AndroidAsync/AndroidManifest.xml b/AndroidAsync/AndroidManifest.xml index a142fb5..10e5898 100644 --- a/AndroidAsync/AndroidManifest.xml +++ b/AndroidAsync/AndroidManifest.xml @@ -1,7 +1,7 @@ <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.koushikdutta.async" - android:versionCode="214" - android:versionName="2.1.4"> + android:versionCode="215" + android:versionName="2.1.5"> <uses-permission android:name="android.permission.INTERNET"/> diff --git a/AndroidAsync/src/com/koushikdutta/async/Util.java b/AndroidAsync/src/com/koushikdutta/async/Util.java index d9808ae..e8b88fa 100644 --- a/AndroidAsync/src/com/koushikdutta/async/Util.java +++ b/AndroidAsync/src/com/koushikdutta/async/Util.java @@ -15,6 +15,7 @@ import java.io.InputStream; import java.nio.ByteBuffer; public class Util { + static boolean SUPRESS_DEBUG_EXCEPTIONS = false; public static void emitAllData(DataEmitter emitter, ByteBufferList list) { int remaining; DataCallback handler = null; @@ -32,6 +33,9 @@ public class Util { // System.out.println("Data: " + list.peekString()); System.out.println("handler: " + handler); + list.recycle(); + if (SUPRESS_DEBUG_EXCEPTIONS) + return; assert false; throw new RuntimeException("mDataHandler failed to consume data, yet remains the mDataHandler."); } @@ -43,6 +47,9 @@ public class Util { // System.out.println("Data: " + list.peekString()); System.out.println("handler: " + handler); System.out.println("emitter: " + emitter); + list.recycle(); + if (SUPRESS_DEBUG_EXCEPTIONS) + return; assert false; throw new RuntimeException("Not all data was consumed by Util.emitAllData"); } |