My javascript calls Java to do IO operation, I was trying to catch IOException inside javascript.
Kevin On 4月8日, 下午8时43分, Mattaku Betsujin <[email protected]> wrote: > I think the answer is no. If java JavaScript calls Java, and the Java method > throws an uncaught exception, it kills the app process. > > Your best bet is to put a try-catch block around every Java method that can > be called by Javascript. > > Just curious. What kind of exception are you expecting? I have written quite > a bit of JavaScript -> java calls in my app and this has never been an issue > for me. > 2009/4/8 kevin <[email protected]> > > > > > Anyone can help on this? I tried to catch exception in javascript but > > doesn't work, is it because webview not support javascript exception > > handling? > > > Thanks, > > Kevin > > > On 4月8日, 上午4时47分, kevin <[email protected]> wrote: > > > My application uses WebView to load javascript which calls into Java > > > class (through webview javascript iterface). Can the JavaScript catch > > > exceptions thrown from Java? This is very important for the > > > application, any help is appreciated. > > > > Thanks > > > Kevin --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

