private String setParameter ( HttpMessage msg , NameValuePair originalPair , String paramName , String value , boolean escaped ) { try { if ( script != null ) { currentParam = originalPair ; script . setParameter ( this , msg , paramName , value , escaped ) ; } } catch ( Exception e ) { // Catch Exception instead of ScriptException because script engine implementations might // throw other exceptions on script errors (e.g. jdk.nashorn.internal.runtime.ECMAException) extension . handleScriptException ( wrapper , e ) ; } finally { currentParam = null ; } return value ; }
Inner method for correct scripting