Catch Exception in JavaScript

by kevin » Wed, 08 Apr 2009 19:47:38 GMT


Sponsored Links
 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
--~--~---------~--~----~------------~-------~--~----~



Catch Exception in JavaScript

by kevin » Thu, 09 Apr 2009 11:35:48 GMT


 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



--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Catch Exception in JavaScript

by Mattaku Betsujin » Thu, 09 Apr 2009 11:43:57 GMT


 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 <kevin_x...@yahoo.com>



--~--~---------~--~----~------------~-------~--~----~



Catch Exception in JavaScript

by kevin » Tue, 14 Apr 2009 09:56:08 GMT


 My javascript calls Java to do IO operation, I was trying to catch
IOException inside javascript.

Kevin




--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Please Help - key down behaves badly

I have a linear layout with several custom view and button.

Whenever I press a  key down I would like that only one view will
respond to it.

However, now when I press a key I see that te focus goes to the button
in that layout.

How to make an activity to respond to te key down event before moving
te focus to the button?

Thanks in advance!

-- 

2. how to run custom app on boot-up???

i have written an application(.apk) which i would wish to be run on
boot-up . Can any body help me to implement this????

-- 

3. buscamos desarrollador

4. stuck right at the beginning

5. Creating and using a 鈥渃ommon platform鈥?jar in Android - what works?

6. What is the class name of media scanner service?

7. Getting started with Android