aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2021-07-30 01:02:19 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2021-07-30 01:02:19 +0000
commitef943fdddf2524613c56bee13231a98752926ad1 (patch)
treec1f9f2bfd78b02643591c1e788686052e3c17746
parentf1268ade88190caaa726d0c747855aa4f8583db7 (diff)
parent2c546635a49710ebb6970b6ef455c27db8651128 (diff)
downloadconnectedappssdk-ef943fdddf2524613c56bee13231a98752926ad1.tar.gz
Snap for 7595546 from 2c546635a49710ebb6970b6ef455c27db8651128 to sc-d2-release
Change-Id: I9f572bca09422332ef742b26431c7a5badb34f94
-rw-r--r--processor/src/main/java/com/google/android/enterprise/connectedapps/processor/OtherProfileGenerator.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/processor/src/main/java/com/google/android/enterprise/connectedapps/processor/OtherProfileGenerator.java b/processor/src/main/java/com/google/android/enterprise/connectedapps/processor/OtherProfileGenerator.java
index ace2f9e..08011ca 100644
--- a/processor/src/main/java/com/google/android/enterprise/connectedapps/processor/OtherProfileGenerator.java
+++ b/processor/src/main/java/com/google/android/enterprise/connectedapps/processor/OtherProfileGenerator.java
@@ -19,6 +19,7 @@ import static com.google.android.enterprise.connectedapps.processor.CommonClassN
import static com.google.android.enterprise.connectedapps.processor.CommonClassNames.LOCAL_CALLBACK_CLASSNAME;
import static com.google.android.enterprise.connectedapps.processor.CommonClassNames.PARCEL_CLASSNAME;
import static com.google.android.enterprise.connectedapps.processor.CommonClassNames.PROFILE_CONNECTOR_CLASSNAME;
+import static com.google.android.enterprise.connectedapps.processor.CommonClassNames.PROFILE_RUNTIME_EXCEPTION_CLASSNAME;
import static com.google.android.enterprise.connectedapps.processor.CommonClassNames.UNAVAILABLE_PROFILE_EXCEPTION_CLASSNAME;
import static com.google.android.enterprise.connectedapps.processor.containers.CrossProfileMethodInfo.AutomaticallyResolvedParameterFilterBehaviour.REMOVE_AUTOMATICALLY_RESOLVED_PARAMETERS;
import static com.google.common.base.Preconditions.checkNotNull;
@@ -209,9 +210,12 @@ final class OtherProfileGenerator {
methodBuilder.addStatement("throw e");
}
+ methodBuilder.nextControlFlow("catch ($T e)", PROFILE_RUNTIME_EXCEPTION_CLASSNAME);
+ methodBuilder.addStatement("throw e");
+
methodBuilder.nextControlFlow("catch ($T e)", Throwable.class);
methodBuilder.addStatement(
- "throw new $T($S)", IllegalStateException.class, "Unexpected exception thrown");
+ "throw new $T($S, e)", IllegalStateException.class, "Unexpected exception thrown");
methodBuilder.endControlFlow();
}