There is no stack trace in the BlackBerry, the best is to use the Debug mode, so the application will break
when the exception happen.
People suggested this
try {
// Code that throws an exception
} catch (Exception e) {
e.printStackTrace();
}
Which will not work on the BlackBerry, you will need to use this instead
System.out.println(e.getMessage());
But since it's only showing the exception, it will not give you the line where the error occured, you will have to add other information within the println
.
On a real device you can get access to the StackTrace by doing this :
Go to the home screen and typing the back-door sequence LGLG. You then filter through the log and locate the exception entry. You can then copy and send the trace via email.
The best I could find on the RIM website is this document.