Skip to content

Commit

Permalink
fix(android): prevent multiple exception logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Gary Mathews authored and sgtcoolguy committed Jun 19, 2019
1 parent 85863b1 commit b735f54
Showing 1 changed file with 4 additions and 5 deletions.
Expand Up @@ -495,17 +495,16 @@ public static void dispatchException(final String title, final String message, f
{
if (instance != null) {
HashMap<String, KrollExceptionHandler> handlers = instance.exceptionHandlers;
KrollExceptionHandler currentHandler;
ExceptionMessage exceptionMessage =
new ExceptionMessage(title, message, sourceName, line, lineSource, lineOffset, jsStack, javaStack);

if (!handlers.isEmpty()) {
for (String key : handlers.keySet()) {
currentHandler = handlers.get(key);
if (currentHandler != null) {
currentHandler.handleException(exceptionMessage);
for (KrollExceptionHandler handler : handlers.values()) {
if (handler != null) {
handler.handleException(exceptionMessage);
}
}
return;
}

// Handle exception with defaultExceptionHandler
Expand Down

0 comments on commit b735f54

Please sign in to comment.