Hi I was wondering how to properly handle an exception in monkey C. I am using try{} catch(ex){} but this does not prevent the app from crashing. The debug console prints out "Unhandled exception" even though I used try catch. In other languages typically using the try block prevents app crash. In python for example there is also the "pass" command which will prevent an exception from crashing the application. Here is a code snippet:
/* Constructor */
public function initialize(devNum){
try{
// initializing ANT channel stuff
}
catch ( ex ) {
System.println("err");
System.println( ex.getErrorMessage() );
}
}
The exception I am getting here is "Unable to acquire ANT channel" -- but I know why this is happening (because my usb ant stick isn't plugged in). I am just looking to handle the exception and push an error message view to the screen without the app crashing, in case this were to happen on someone's device.