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.


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



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 <>


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.



Other Threads

1. integrate the H/W decoder into stagefright


I have quickly looked Stagefright source in Gingerbread. It seems that
Stagefright uses codecs in either OMXCodec or OMX plugins.

I have a H/W AVC decoder derived from OmxComponentVideo and registered in
pv_omxcore.cpp in Froyo OpenCORE. What is the best/quick way to integrate
the decoder into Gingerbread Stagefright?



2. why samsung and qcom do not implement audio omx section in /hardware

hi group,
    i'm working on  implementation of vendor omx  section in froyo, and make
it run together with stagefright.
i notice that in android_root/hardware/qcom/media folder there are qcom's
 also i checked out samsung's omx code (from git://, in which there is
also no audio omx component section.

i wonder why they(samsung and qcom) do not implement the audio omx section,
however, they have video omx's implementation.
here is my guess:
1. they do not implement audio decoder, but only using the audio decoder
originally in Android
2. they implement their own audio codec as the same way of Android's audio
codec, then substitute them,
3. they have other implementations of decoding audio that we do not know

can anyone give me some ideas? and what is your strategy of audio decoder,
omx way or using android's internal audio decoder

   also, i have review the code of ti in android_root/hardware/ti/omp3, they
do have audio decoders such as aac, mp3, wma etc,
from normal logical, we should implement video and audio omx component
together, so we can play movie in full omx way.

my question is: why qcom and samsung do not implement audio omx but only
video omx component? and what audio decoder do they use when playing movie?


3. Pilih Mana? Android Atau iPhone? (via

4. reset market license

5. Confusion over MediaPlayer Framework on GingerBread and Apple's HTTP Live Streaming Support

6. Considered SOLDFw: Wts droid 2 mind condition

7. Waiting for debugger force close (when USB is not attached)