Commit 14c2e075 authored by Luis Hector Chavez's avatar Luis Hector Chavez Committed by Commit Bot

Mojo: Use the unhandled exception handler for connection errors

This change also lets the unhandled exception handler take a first
attempt at handling errors that occur when handling connection errors.
yo dawg!

Bug: 810087
Test: Intentionally threw an exception from a connection error handler
Change-Id: I432055b33443208a352d272c7f7fcb1dbeb2a43f
Reviewed-on: https://chromium-review.googlesource.com/1147516Reviewed-by: default avatarKen Rockot <rockot@chromium.org>
Commit-Queue: Luis Hector Chavez <lhchavez@chromium.org>
Cr-Commit-Position: refs/heads/master@{#577562}
parent 8c0d9618
...@@ -158,7 +158,11 @@ public class Connector implements MessageReceiver, HandleOwner<MessagePipeHandle ...@@ -158,7 +158,11 @@ public class Connector implements MessageReceiver, HandleOwner<MessagePipeHandle
private void onError(MojoException exception) { private void onError(MojoException exception) {
close(); close();
if (mErrorHandler != null) { if (mErrorHandler != null) {
mErrorHandler.onConnectionError(exception); try {
mErrorHandler.onConnectionError(exception);
} catch (RuntimeException e) {
ExceptionHandler.DefaultExceptionHandler.getInstance().handleException(e);
}
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment