Skip to content

Instantly share code, notes, and snippets.

@carlosfigueira
Created August 28, 2014 17:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save carlosfigueira/d5e25575af38fddfb396 to your computer and use it in GitHub Desktop.
Save carlosfigueira/d5e25575af38fddfb396 to your computer and use it in GitHub Desktop.
Printing out all of the nested exceptions
public void onCompleted(Bill entity, Exception exception, ServiceFilterResponse response) {
Log.i(TAG, "Called insert");
if (exception == null){
Log.i(TAG, "Azure insert succeeded ID: " + entity.Id);
} else {
Log.i(TAG, "Azure insert failed again " + exception);
Throwable t = exception.getCause();
while (t != null) {
Log.i(TAG, "Cause of error: " + t);
t = t.getCause();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment