aboutsummaryrefslogtreecommitdiffstats
path: root/src/org/thialfihar/android/apg/utils/ApgCon.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/thialfihar/android/apg/utils/ApgCon.java')
-rw-r--r--src/org/thialfihar/android/apg/utils/ApgCon.java15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/org/thialfihar/android/apg/utils/ApgCon.java b/src/org/thialfihar/android/apg/utils/ApgCon.java
index 16ba94a1f..4852ad548 100644
--- a/src/org/thialfihar/android/apg/utils/ApgCon.java
+++ b/src/org/thialfihar/android/apg/utils/ApgCon.java
@@ -1,5 +1,6 @@
package org.thialfihar.android.apg.utils;
+import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import android.content.Context;
@@ -42,7 +43,12 @@ public class ApgCon {
Log.d(TAG, "Callback executed");
} catch (NoSuchMethodException e) {
Log.w(TAG, "Exception in callback: Method '" + callback_method + "' not found");
- warning_list.add("(LOCAL) Could not execute callback, method '" + callback_method + "' not found");
+ warning_list.add("(LOCAL) Could not execute callback, method '" + callback_method + "()' not found");
+ } catch (InvocationTargetException e) {
+ Throwable orig = e.getTargetException();
+ Log.w(TAG, "Exception of type '" + orig.getClass() + "' in callback's method '" + callback_method + "()':" + orig.getMessage());
+ warning_list.add("(LOCAL) Exception of type '" + orig.getClass() + "' in callback's method '" + callback_method + "()':"
+ + orig.getMessage());
} catch (Exception e) {
Log.w(TAG, "Exception on callback: (" + e.getClass() + ") " + e.getMessage());
warning_list.add("(LOCAL) Could not execute callback (" + e.getClass() + "): " + e.getMessage());
@@ -303,8 +309,13 @@ public class ApgCon {
error_list.add("(LOCAL) Remote call not known (" + function + "): " + e.getMessage());
local_error = error.CALL_NOT_KNOWN;
return false;
+ } catch (InvocationTargetException e) {
+ Throwable orig = e.getTargetException();
+ Log.w(TAG, "Exception of type '" + orig.getClass() + "' on AIDL call '" + function + "':" + orig.getMessage());
+ error_list.add("(LOCAL) Exception of type '" + orig.getClass() + "' on AIDL call '" + function + "':" + orig.getMessage());
+ return false;
} catch (Exception e) {
- Log.e(TAG, "Generic error (" + e.getClass() + "): " + e.getMessage());
+ Log.e(TAG, "Generic error (" + e.getClass() + "): " + e.getMessage());
error_list.add("(LOCAL) Generic error (" + e.getClass() + "): " + e.getMessage());
local_error = error.GENERIC;
return false;