fix NPE on errors other than GroovyRuntimeException