Error Handling

Hi,

How can i differentiate Transient And fatal error at run time?

I implemented resource monitoring mechanism in trigger.

Subscriber Service:

Main(Success){
Try(Failure){
MAP
DB Activities
}
Catch(Done){
getLastError
if (error=Transient Error), set isAvailable =false.
}
}
Branch on isAvailable
false, ThrowExceptionForRetry.

Resource Monitor Service:

Main(Success){
Try(Failure){
Check the DB Status
Set isAvailable=true
}
Catch{
Set isAvailable=False.
}
}

My doubt how to check transient error occurred in the subscribing service try block from lastError?

i may be wrong but i think there is no out of box mechanism to tell you if an error is transient or fatal. for this you may have to create some kind of database with error numbers and seeing what error number means what to you and take action accordingly.

Transient error is an instance of com.wm.app.b2b.server.ISRuntimeException, you can check the class.