Catch NullPointer Exception when running BSFScripts

Description

If you have a script (groovy in my case) and want it to run with the BSFMonitor and have anywhere a print statement the monitor will fail with a nullpointer exception.
For someone not knowing where it come from it is difficult to find/fix.
Catch that in line 19 of BSFMonitor.java and return a error (Script failed) as pollstatus.

Acceptance / Success Criteria

None

Lucidchart Diagrams

Activity

Show:

Seth Leger February 2, 2011 at 2:27 PM

I've added a catch for Throwable that will handle cases like this. The code has been committed to master for inclusion in 1.9 (since 1.8 is closed for everything except major bugfixes). Marking as fixed.

commit f2cd53b1bb59df6b58c61c6227777834f1801744

Fixed

Details

Assignee

Reporter

Fix versions

Affects versions

Priority

PagerDuty

Created January 5, 2011 at 8:28 AM
Updated January 27, 2017 at 4:19 PM
Resolved February 2, 2011 at 2:27 PM