Skip to content

Commit

Permalink
Avoid calling undefined method in UncaughtExceptionHandler (#18)
Browse files Browse the repository at this point in the history
Fixes #17
  • Loading branch information
zbynek authored Oct 20, 2023
1 parent a4f0d77 commit cf6c05a
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions gwt-core/src/main/java/org/gwtproject/core/client/GWT.java
Original file line number Diff line number Diff line change
Expand Up @@ -135,13 +135,14 @@ private static void addOnErrorHandler(Window window, Window.OnerrorFn onerrorFn)
Window.OnerrorFn original = window.onerror;
if (original == null) {
window.onerror = onerrorFn;
} else {
window.onerror =
(p0, p1, p2, p3, p4) -> {
onerrorFn.onInvoke(p0, p1, p2, p3, p4);
original.onInvoke(p0, p1, p2, p3, p4);
return null;
};
}
window.onerror =
(p0, p1, p2, p3, p4) -> {
onerrorFn.onInvoke(p0, p1, p2, p3, p4);
original.onInvoke(p0, p1, p2, p3, p4);
return null;
};
}

/**
Expand Down

0 comments on commit cf6c05a

Please sign in to comment.