[JENKINS-21693] More reasonable logging of exceptions thrown from @JavaScriptMethod.