3

I wonder how people usually do to handle multiple exception from javascript in GWT? for example, this method from the IndexedDB specification:

IDBRequest add( in any value, in optional any key ) raises (IDBDatabaseException, DOMException);

It can raise two JavaScript exception objects, so i have no idea how to implement wrapper for it in Java.

Chan Le
  • 2,184
  • 3
  • 23
  • 33

2 Answers2

1

There exist an

GWT.setUncaughtExceptionHandler(new ClientExceptionHandler());

Its already discribed here: GWT.setUncaughtExceptionHandler()

I don't think I have to add anything :)

Community
  • 1
  • 1
Stefan
  • 14,826
  • 17
  • 80
  • 143
0

I used the java's try catch to catch javascriptexception. it works well :)

Chan Le
  • 2,184
  • 3
  • 23
  • 33