diff --git a/generate_java_binder.cpp b/generate_java_binder.cpp
index e5561ff..343cbd6 100644
--- a/generate_java_binder.cpp
+++ b/generate_java_binder.cpp
@@ -611,7 +611,8 @@
           (*writer) << "int " << var_length << " = data.readInt();\n";
           // if impossibly large array requested, return false
           (*writer) << "if (" << var_length << " > 1000000) {\n";
-          (*writer) << "  return false;\n";
+          (*writer) << "  throw new android.os.BadParcelableException(\"Array too large: \" + "
+                    << var_length << ");\n";
           (*writer) << "} else if (" << var_length << " < 0) {\n";
           (*writer) << "  " << v->name << " = null;\n";
           (*writer) << "} else {\n";
diff --git a/tests/golden_output/aidl-cpp-java-test-interface-java-source/gen/android/aidl/tests/ICppJavaTests.java b/tests/golden_output/aidl-cpp-java-test-interface-java-source/gen/android/aidl/tests/ICppJavaTests.java
index 69fed98..7ed4f60 100644
--- a/tests/golden_output/aidl-cpp-java-test-interface-java-source/gen/android/aidl/tests/ICppJavaTests.java
+++ b/tests/golden_output/aidl-cpp-java-test-interface-java-source/gen/android/aidl/tests/ICppJavaTests.java
@@ -175,7 +175,7 @@
           android.os.PersistableBundle[] _arg1;
           int _arg1_length = data.readInt();
           if (_arg1_length > 1000000) {
-            return false;
+            throw new android.os.BadParcelableException("Array too large: " + _arg1_length);
           } else if (_arg1_length < 0) {
             _arg1 = null;
           } else {
@@ -231,7 +231,7 @@
           java.io.FileDescriptor[] _arg1;
           int _arg1_length = data.readInt();
           if (_arg1_length > 1000000) {
-            return false;
+            throw new android.os.BadParcelableException("Array too large: " + _arg1_length);
           } else if (_arg1_length < 0) {
             _arg1 = null;
           } else {
diff --git a/tests/golden_output/aidl-test-interface-java-source/gen/android/aidl/tests/ArrayOfInterfaces.java b/tests/golden_output/aidl-test-interface-java-source/gen/android/aidl/tests/ArrayOfInterfaces.java
index 45fdd79..bf3c430 100644
--- a/tests/golden_output/aidl-test-interface-java-source/gen/android/aidl/tests/ArrayOfInterfaces.java
+++ b/tests/golden_output/aidl-test-interface-java-source/gen/android/aidl/tests/ArrayOfInterfaces.java
@@ -223,7 +223,7 @@
             android.aidl.tests.ArrayOfInterfaces.IEmptyInterface[] _arg3;
             int _arg3_length = data.readInt();
             if (_arg3_length > 1000000) {
-              return false;
+              throw new android.os.BadParcelableException("Array too large: " + _arg3_length);
             } else if (_arg3_length < 0) {
               _arg3 = null;
             } else {
@@ -236,7 +236,7 @@
             android.aidl.tests.ArrayOfInterfaces.IEmptyInterface[] _arg6;
             int _arg6_length = data.readInt();
             if (_arg6_length > 1000000) {
-              return false;
+              throw new android.os.BadParcelableException("Array too large: " + _arg6_length);
             } else if (_arg6_length < 0) {
               _arg6 = null;
             } else {
diff --git a/tests/golden_output/aidl-test-interface-java-source/gen/android/aidl/tests/ITestService.java b/tests/golden_output/aidl-test-interface-java-source/gen/android/aidl/tests/ITestService.java
index ebc333b..10284b0 100644
--- a/tests/golden_output/aidl-test-interface-java-source/gen/android/aidl/tests/ITestService.java
+++ b/tests/golden_output/aidl-test-interface-java-source/gen/android/aidl/tests/ITestService.java
@@ -1104,7 +1104,7 @@
           boolean[] _arg1;
           int _arg1_length = data.readInt();
           if (_arg1_length > 1000000) {
-            return false;
+            throw new android.os.BadParcelableException("Array too large: " + _arg1_length);
           } else if (_arg1_length < 0) {
             _arg1 = null;
           } else {
@@ -1124,7 +1124,7 @@
           byte[] _arg1;
           int _arg1_length = data.readInt();
           if (_arg1_length > 1000000) {
-            return false;
+            throw new android.os.BadParcelableException("Array too large: " + _arg1_length);
           } else if (_arg1_length < 0) {
             _arg1 = null;
           } else {
@@ -1144,7 +1144,7 @@
           char[] _arg1;
           int _arg1_length = data.readInt();
           if (_arg1_length > 1000000) {
-            return false;
+            throw new android.os.BadParcelableException("Array too large: " + _arg1_length);
           } else if (_arg1_length < 0) {
             _arg1 = null;
           } else {
@@ -1164,7 +1164,7 @@
           int[] _arg1;
           int _arg1_length = data.readInt();
           if (_arg1_length > 1000000) {
-            return false;
+            throw new android.os.BadParcelableException("Array too large: " + _arg1_length);
           } else if (_arg1_length < 0) {
             _arg1 = null;
           } else {
@@ -1184,7 +1184,7 @@
           long[] _arg1;
           int _arg1_length = data.readInt();
           if (_arg1_length > 1000000) {
-            return false;
+            throw new android.os.BadParcelableException("Array too large: " + _arg1_length);
           } else if (_arg1_length < 0) {
             _arg1 = null;
           } else {
@@ -1204,7 +1204,7 @@
           float[] _arg1;
           int _arg1_length = data.readInt();
           if (_arg1_length > 1000000) {
-            return false;
+            throw new android.os.BadParcelableException("Array too large: " + _arg1_length);
           } else if (_arg1_length < 0) {
             _arg1 = null;
           } else {
@@ -1224,7 +1224,7 @@
           double[] _arg1;
           int _arg1_length = data.readInt();
           if (_arg1_length > 1000000) {
-            return false;
+            throw new android.os.BadParcelableException("Array too large: " + _arg1_length);
           } else if (_arg1_length < 0) {
             _arg1 = null;
           } else {
@@ -1244,7 +1244,7 @@
           java.lang.String[] _arg1;
           int _arg1_length = data.readInt();
           if (_arg1_length > 1000000) {
-            return false;
+            throw new android.os.BadParcelableException("Array too large: " + _arg1_length);
           } else if (_arg1_length < 0) {
             _arg1 = null;
           } else {
@@ -1264,7 +1264,7 @@
           byte[] _arg1;
           int _arg1_length = data.readInt();
           if (_arg1_length > 1000000) {
-            return false;
+            throw new android.os.BadParcelableException("Array too large: " + _arg1_length);
           } else if (_arg1_length < 0) {
             _arg1 = null;
           } else {
@@ -1284,7 +1284,7 @@
           int[] _arg1;
           int _arg1_length = data.readInt();
           if (_arg1_length > 1000000) {
-            return false;
+            throw new android.os.BadParcelableException("Array too large: " + _arg1_length);
           } else if (_arg1_length < 0) {
             _arg1 = null;
           } else {
@@ -1304,7 +1304,7 @@
           long[] _arg1;
           int _arg1_length = data.readInt();
           if (_arg1_length > 1000000) {
-            return false;
+            throw new android.os.BadParcelableException("Array too large: " + _arg1_length);
           } else if (_arg1_length < 0) {
             _arg1 = null;
           } else {
@@ -1447,7 +1447,7 @@
           android.os.ParcelFileDescriptor[] _arg1;
           int _arg1_length = data.readInt();
           if (_arg1_length > 1000000) {
-            return false;
+            throw new android.os.BadParcelableException("Array too large: " + _arg1_length);
           } else if (_arg1_length < 0) {
             _arg1 = null;
           } else {
@@ -1622,7 +1622,7 @@
           java.lang.String[] _arg1;
           int _arg1_length = data.readInt();
           if (_arg1_length > 1000000) {
-            return false;
+            throw new android.os.BadParcelableException("Array too large: " + _arg1_length);
           } else if (_arg1_length < 0) {
             _arg1 = null;
           } else {
@@ -1642,7 +1642,7 @@
           java.lang.String[] _arg1;
           int _arg1_length = data.readInt();
           if (_arg1_length > 1000000) {
-            return false;
+            throw new android.os.BadParcelableException("Array too large: " + _arg1_length);
           } else if (_arg1_length < 0) {
             _arg1 = null;
           } else {
@@ -1717,7 +1717,7 @@
           android.os.IBinder[] _arg1;
           int _arg1_length = data.readInt();
           if (_arg1_length > 1000000) {
-            return false;
+            throw new android.os.BadParcelableException("Array too large: " + _arg1_length);
           } else if (_arg1_length < 0) {
             _arg1 = null;
           } else {
@@ -1737,7 +1737,7 @@
           android.os.IBinder[] _arg1;
           int _arg1_length = data.readInt();
           if (_arg1_length > 1000000) {
-            return false;
+            throw new android.os.BadParcelableException("Array too large: " + _arg1_length);
           } else if (_arg1_length < 0) {
             _arg1 = null;
           } else {
@@ -1770,7 +1770,7 @@
           android.aidl.tests.SimpleParcelable[] _arg1;
           int _arg1_length = data.readInt();
           if (_arg1_length > 1000000) {
-            return false;
+            throw new android.os.BadParcelableException("Array too large: " + _arg1_length);
           } else if (_arg1_length < 0) {
             _arg1 = null;
           } else {
diff --git a/tests/golden_output/frozen/aidl-cpp-java-test-interface-java-source/gen/android/aidl/tests/ICppJavaTests.java b/tests/golden_output/frozen/aidl-cpp-java-test-interface-java-source/gen/android/aidl/tests/ICppJavaTests.java
index 69fed98..7ed4f60 100644
--- a/tests/golden_output/frozen/aidl-cpp-java-test-interface-java-source/gen/android/aidl/tests/ICppJavaTests.java
+++ b/tests/golden_output/frozen/aidl-cpp-java-test-interface-java-source/gen/android/aidl/tests/ICppJavaTests.java
@@ -175,7 +175,7 @@
           android.os.PersistableBundle[] _arg1;
           int _arg1_length = data.readInt();
           if (_arg1_length > 1000000) {
-            return false;
+            throw new android.os.BadParcelableException("Array too large: " + _arg1_length);
           } else if (_arg1_length < 0) {
             _arg1 = null;
           } else {
@@ -231,7 +231,7 @@
           java.io.FileDescriptor[] _arg1;
           int _arg1_length = data.readInt();
           if (_arg1_length > 1000000) {
-            return false;
+            throw new android.os.BadParcelableException("Array too large: " + _arg1_length);
           } else if (_arg1_length < 0) {
             _arg1 = null;
           } else {
diff --git a/tests/golden_output/frozen/aidl-test-interface-java-source/gen/android/aidl/tests/ArrayOfInterfaces.java b/tests/golden_output/frozen/aidl-test-interface-java-source/gen/android/aidl/tests/ArrayOfInterfaces.java
index 45fdd79..bf3c430 100644
--- a/tests/golden_output/frozen/aidl-test-interface-java-source/gen/android/aidl/tests/ArrayOfInterfaces.java
+++ b/tests/golden_output/frozen/aidl-test-interface-java-source/gen/android/aidl/tests/ArrayOfInterfaces.java
@@ -223,7 +223,7 @@
             android.aidl.tests.ArrayOfInterfaces.IEmptyInterface[] _arg3;
             int _arg3_length = data.readInt();
             if (_arg3_length > 1000000) {
-              return false;
+              throw new android.os.BadParcelableException("Array too large: " + _arg3_length);
             } else if (_arg3_length < 0) {
               _arg3 = null;
             } else {
@@ -236,7 +236,7 @@
             android.aidl.tests.ArrayOfInterfaces.IEmptyInterface[] _arg6;
             int _arg6_length = data.readInt();
             if (_arg6_length > 1000000) {
-              return false;
+              throw new android.os.BadParcelableException("Array too large: " + _arg6_length);
             } else if (_arg6_length < 0) {
               _arg6 = null;
             } else {
diff --git a/tests/golden_output/frozen/aidl-test-interface-java-source/gen/android/aidl/tests/ITestService.java b/tests/golden_output/frozen/aidl-test-interface-java-source/gen/android/aidl/tests/ITestService.java
index ebc333b..10284b0 100644
--- a/tests/golden_output/frozen/aidl-test-interface-java-source/gen/android/aidl/tests/ITestService.java
+++ b/tests/golden_output/frozen/aidl-test-interface-java-source/gen/android/aidl/tests/ITestService.java
@@ -1104,7 +1104,7 @@
           boolean[] _arg1;
           int _arg1_length = data.readInt();
           if (_arg1_length > 1000000) {
-            return false;
+            throw new android.os.BadParcelableException("Array too large: " + _arg1_length);
           } else if (_arg1_length < 0) {
             _arg1 = null;
           } else {
@@ -1124,7 +1124,7 @@
           byte[] _arg1;
           int _arg1_length = data.readInt();
           if (_arg1_length > 1000000) {
-            return false;
+            throw new android.os.BadParcelableException("Array too large: " + _arg1_length);
           } else if (_arg1_length < 0) {
             _arg1 = null;
           } else {
@@ -1144,7 +1144,7 @@
           char[] _arg1;
           int _arg1_length = data.readInt();
           if (_arg1_length > 1000000) {
-            return false;
+            throw new android.os.BadParcelableException("Array too large: " + _arg1_length);
           } else if (_arg1_length < 0) {
             _arg1 = null;
           } else {
@@ -1164,7 +1164,7 @@
           int[] _arg1;
           int _arg1_length = data.readInt();
           if (_arg1_length > 1000000) {
-            return false;
+            throw new android.os.BadParcelableException("Array too large: " + _arg1_length);
           } else if (_arg1_length < 0) {
             _arg1 = null;
           } else {
@@ -1184,7 +1184,7 @@
           long[] _arg1;
           int _arg1_length = data.readInt();
           if (_arg1_length > 1000000) {
-            return false;
+            throw new android.os.BadParcelableException("Array too large: " + _arg1_length);
           } else if (_arg1_length < 0) {
             _arg1 = null;
           } else {
@@ -1204,7 +1204,7 @@
           float[] _arg1;
           int _arg1_length = data.readInt();
           if (_arg1_length > 1000000) {
-            return false;
+            throw new android.os.BadParcelableException("Array too large: " + _arg1_length);
           } else if (_arg1_length < 0) {
             _arg1 = null;
           } else {
@@ -1224,7 +1224,7 @@
           double[] _arg1;
           int _arg1_length = data.readInt();
           if (_arg1_length > 1000000) {
-            return false;
+            throw new android.os.BadParcelableException("Array too large: " + _arg1_length);
           } else if (_arg1_length < 0) {
             _arg1 = null;
           } else {
@@ -1244,7 +1244,7 @@
           java.lang.String[] _arg1;
           int _arg1_length = data.readInt();
           if (_arg1_length > 1000000) {
-            return false;
+            throw new android.os.BadParcelableException("Array too large: " + _arg1_length);
           } else if (_arg1_length < 0) {
             _arg1 = null;
           } else {
@@ -1264,7 +1264,7 @@
           byte[] _arg1;
           int _arg1_length = data.readInt();
           if (_arg1_length > 1000000) {
-            return false;
+            throw new android.os.BadParcelableException("Array too large: " + _arg1_length);
           } else if (_arg1_length < 0) {
             _arg1 = null;
           } else {
@@ -1284,7 +1284,7 @@
           int[] _arg1;
           int _arg1_length = data.readInt();
           if (_arg1_length > 1000000) {
-            return false;
+            throw new android.os.BadParcelableException("Array too large: " + _arg1_length);
           } else if (_arg1_length < 0) {
             _arg1 = null;
           } else {
@@ -1304,7 +1304,7 @@
           long[] _arg1;
           int _arg1_length = data.readInt();
           if (_arg1_length > 1000000) {
-            return false;
+            throw new android.os.BadParcelableException("Array too large: " + _arg1_length);
           } else if (_arg1_length < 0) {
             _arg1 = null;
           } else {
@@ -1447,7 +1447,7 @@
           android.os.ParcelFileDescriptor[] _arg1;
           int _arg1_length = data.readInt();
           if (_arg1_length > 1000000) {
-            return false;
+            throw new android.os.BadParcelableException("Array too large: " + _arg1_length);
           } else if (_arg1_length < 0) {
             _arg1 = null;
           } else {
@@ -1622,7 +1622,7 @@
           java.lang.String[] _arg1;
           int _arg1_length = data.readInt();
           if (_arg1_length > 1000000) {
-            return false;
+            throw new android.os.BadParcelableException("Array too large: " + _arg1_length);
           } else if (_arg1_length < 0) {
             _arg1 = null;
           } else {
@@ -1642,7 +1642,7 @@
           java.lang.String[] _arg1;
           int _arg1_length = data.readInt();
           if (_arg1_length > 1000000) {
-            return false;
+            throw new android.os.BadParcelableException("Array too large: " + _arg1_length);
           } else if (_arg1_length < 0) {
             _arg1 = null;
           } else {
@@ -1717,7 +1717,7 @@
           android.os.IBinder[] _arg1;
           int _arg1_length = data.readInt();
           if (_arg1_length > 1000000) {
-            return false;
+            throw new android.os.BadParcelableException("Array too large: " + _arg1_length);
           } else if (_arg1_length < 0) {
             _arg1 = null;
           } else {
@@ -1737,7 +1737,7 @@
           android.os.IBinder[] _arg1;
           int _arg1_length = data.readInt();
           if (_arg1_length > 1000000) {
-            return false;
+            throw new android.os.BadParcelableException("Array too large: " + _arg1_length);
           } else if (_arg1_length < 0) {
             _arg1 = null;
           } else {
@@ -1770,7 +1770,7 @@
           android.aidl.tests.SimpleParcelable[] _arg1;
           int _arg1_length = data.readInt();
           if (_arg1_length > 1000000) {
-            return false;
+            throw new android.os.BadParcelableException("Array too large: " + _arg1_length);
           } else if (_arg1_length < 0) {
             _arg1 = null;
           } else {
