Inside Oracle BPM logic, you can catch exceptions using logic like this:

try {

    MyJavaClass.method(arg1 : arg);

}

catch (NullPointerException e) {

    logMessage("it's a null");

}

catch (Exception e) {

    logMessage("it's an exception");

}

catch (Any e) {

    logMessage("it's an Any");

}

If I’d left off the “NullPointerException” try/catch block, it would have been caught by the “Exception” try/catch block. If I’d left off both of these it would have been caught by the “Any” try/catch block.

If you test the logic from the Workspace you won’t see the confusing dialog come up that an uncaught exception occurred. If you instead run your logic from the method editor’s debugger, you’ll see what appears to be an uncaught exception. If you’re running the logic from the method editor’s debugger, be sure to click the “Throw” button. If you do this, it will be caught appropriately (in my case in the NullPointerException try/catch block).