Skip to content

Commit

Permalink
#933: Handle unexpected errors on DefaultRegistrationEngine
Browse files Browse the repository at this point in the history
Call `LwM2mClientObserver#onUnexpectedError()` on
`DefaultRegistrationEngine` when it raises `RuntimeException`
at task loop.

Signed-off-by: moznion <moznion@gmail.com>
  • Loading branch information
moznion authored and sbernard31 committed Dec 7, 2020
1 parent d0f2705 commit a1bacb5
Showing 1 changed file with 3 additions and 0 deletions.
Expand Up @@ -526,6 +526,7 @@ public void run() {
LOG.info("Bootstrap task interrupted. ");
} catch (RuntimeException e) {
LOG.error("Unexpected exception during bootstrap task", e);
observer.onUnexpectedError(e);
}
}
}
Expand Down Expand Up @@ -564,6 +565,7 @@ public void run() {
LOG.info("Registration task interrupted. ");
} catch (RuntimeException e) {
LOG.error("Unexpected exception during registration task", e);
observer.onUnexpectedError(e);
}
}
}
Expand Down Expand Up @@ -612,6 +614,7 @@ public void run() {
LOG.info("Registration update task interrupted.");
} catch (RuntimeException e) {
LOG.error("Unexpected exception during update registration task", e);
observer.onUnexpectedError(e);
}
}
}
Expand Down

0 comments on commit a1bacb5

Please sign in to comment.