Is there a way to get the exception stack trace as a string in Blackberry?

I want to write an exception stack trace to a file. Is there a way to get the stack trace in the form of a String or somehow make ex.printStackTrace() print the trace to a stream or file? I know that there is a way to do this in the standard version of Java, but I want it in Blackberry.

+6
debugging crash blackberry java-me trace
source share
1 answer

BlackBerry only provides stack traces when you catch Throwable. Thus, you should be able to use printStackTrace and friends if you change the catch type.

EDIT Sorry, I misunderstood your question - thanks for the comment. No, there is no way to get the stack trace in a String object. In January 2010, there is a support forum topic that covers this: Capturing a stack trace (extremely necessary) . Since then, nothing has changed.

If you need this for development, you can extract the event log from the device , which includes stack traces. But this does not help solve production problems.

+8
source share

All Articles