We are enclose our integrations around try-catch blocks that you can build with Enterprise Integrator. These catch AdapterException. Within such a try-catch block, I executed the statement
s.indexOf(“abc”)
where s = null. This threw a null pointer exception. It seems that the try-catch block did not catch this exception, and I’m having trouble figuring out how to catch it.
This probably isn’t what you were after but perhaps you could test for null before working with s, thereby avoiding the need to catch the exception at all.
if(s != null)
idx=s.indexOf("abc")
else
idx=-1
Not trying to be a smart-aleck on this. We just sometimes overlook the obvious.
I wanted to catch all catchable errors that may arise. I thought the Enterprise Server try-catch blocks handled all exceptions, but the above is a counter-example.
So, my revised question: What exceptions don’t the Enterprise Server try-catch blocks catch, and how can I catch them (across steps in an integration)?