Getting error using boundary error event

I want to throw some error using error event,I am using java script.

if(resultString.contains(“ERROR!”)){

throw new org.camunda.bpm.engine.delegate.BpmnError(“executionError”, "Task " + taskName + " failed for device " + deviceName);

}

Getting below error

‘iosxr-osupgrade-sub:11:7d9fcfb4-af28-11eb-918b-0a580a170080’:org.camunda.bpm.engine.delegate.BpmnError: Task OS Upgrade for AN_4 failed for device AN_4 (errorCode=‘executionError’) in at line number 8 at column number 2
org.camunda.bpm.engine.ScriptEvaluationException: Unable to evaluate script while executing activity ‘Task_0zamzjz’ in the process definition with id ‘iosxr-osupgrade-sub:11:7d9fcfb4-af28-11eb-918b-0a580a170080’:org.camunda.bpm.engine.delegate.BpmnError: Task OS Upgrade for AN_4 failed for device AN_4 (errorCode=‘executionError’) in at line number 8 at column number 2
at org.camunda.bpm.engine.impl.scripting.SourceExecutableScript.evaluate(SourceExecutableScript.java:71)