views:

410

answers:

2

Edit: this applies to simulators only, but i would still like to know if there is a resolution.

I have some code in a blackberry application that catches an exception at some point, does some handling in the catch block then rethrows the exception, which is caught higher up on the call stack. However even though i do catch it later on, i still see an error message displayed on the simulator, along with a jvm 104 error in the device logs. Is there something else i need to do to suppress this error screen from displaying when i already catch the exception it's complaining about?

+2  A: 

Have you tried the JDE Preferences menu, Simulator tab, Debugging subtab? There's an option in there labeled "Do not stop execution when an exception is caught by catch(Throwable)". Maybe that would do it? (This assumes that you launch the simulator from the JDE)

Marc Novakowski
I usually use the Eclipse plugin, but other people who this affects just launch the simulator directly. Since this is not a device issue i wonder if there's a command line option that does this when launched from the jde with that option enabled.
Kevlar
Try running fledge.exe (in your simulator directory) with -help option. It looks like there might be a command line option to disable particular errors using /ignore-error={int} or maybe in your case /ignore-error=104
Marc Novakowski
A: 

Are you actually doing a catch(Throwable)? As Marc says, that'll show up in the error logs on the simulator. RIM discourages doing things that way as you take a performance hit (I'll avoid ranting about their JVM design), so that may be another reason to solve this by just catching things a different way (e.g. not Throwable but a more specific exception type - unless you really need that stack trace).

Anthony Rizk
yes that's the case. its actually not my code but an open source library we've integrated into our product that does specific things with the stack trace i believe. Not much can be done on that front i think.
Kevlar