Custom Trigger TriggerRunner.getDebuger().log() causes Null

Posted by cohezive on 04-Apr-2015 16:53

A painful lesson I'm passing along.

If you use TriggerRunner.getDebuger().log() to debug your custom trigger code, this call will result in an untrapped Exception due to a null pointer error when the Rollbase debug screen is not active.

The solution is to test the value of TriggerRunner.getDebugger() for NULL before calling TriggerRunner.getDebuger().log().

It would be helpful to add this to the documentation.  I assumed that with the lack of the debug screen, Rollber would have generated a dummy object to protect from this condition.

All Replies

Posted by pvorobie on 06-Apr-2015 12:02

I agree, it is a good idea to test Java Object reference for NULL before using it to avoid NPE.

In your case please start debugging first through UI.

This thread is closed