added exceptionhandling and error unwrpping for javascriptexecution