From e49bd233c187e3e754e96dc6481b6047bf98f112 Mon Sep 17 00:00:00 2001 From: Koushik Dutta Date: Tue, 9 Jun 2015 14:05:14 -0700 Subject: 215: supress debug exceptions --- AndroidAsync/AndroidManifest.xml | 4 ++-- AndroidAsync/src/com/koushikdutta/async/Util.java | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'AndroidAsync') 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 @@ + android:versionCode="215" + android:versionName="2.1.5"> 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"); } -- cgit v1.2.3