Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
Posts: 201
Registered: ‎12-17-2010
My Device: Not Specified

default exception handler

Hello friends,

I want to implement default exception handler for every exceptions to catch.

So,is possible to set it for blackberry classes.

I just want to implement UncaughtExceptionHandler.

If any one has any suggestion or any idea please help me.

 

Thanks & Regards

Developer
Posts: 17,012
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: default exception handler

you can put a try/catch around enterEventDispatcher, this will help in some cases. I don't think its possible to catch all exceptions with one handler (and its not desireable)
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Developer
Posts: 201
Registered: ‎12-17-2010
My Device: Not Specified

Re: default exception handler

Hello Simon Hain,

 

Thanks for reply.

Is there any way that we can use default Exception handler like Android developes use it to catch the all exceptions.

if any idea please suggest me.

 

Thnaks & Regards

 

 

Highlighted
Developer
Posts: 1,807
Registered: ‎04-28-2009
My Device: Z10 (STL100-4)-10.3.2.858, Z10 (STL100-3)-10.3.1.2576, Z30 (STA100-5)-10.3.1.2582, Passport (SQW100-1)-10.3.1.2576, PlayBook (16GB)-2.1.0.1917
My Carrier: Verizon

Re: default exception handler

No, it's not in the J2ME specification so it's not included in the BlackBerry implementation.

 

In other words, no there is no way to do that in a simple sense. You would need to do what Simon Said, and wrap the code in an exception handler.

---Spends time in #blackberrydev on freenode (IRC)----
Three simple rules:
1. Please use the search bar before making new posts.
2. "Like" posts that you find helpful.
3. If a solution has been found for your post, mark it as solved.
--I code too much. Well, too bad.