Created
February 20, 2015 09:21
-
-
Save purplefox/003fae1e32fd44368ffa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try { | |
exports = (ScriptObjectMirror) engine.eval("require.noCache('" + verticleName + "');"); | |
} catch (ScriptException e) { | |
Throwable t = e.getCause(); | |
if (t instanceof ECMAException) { | |
ECMAException ee = (ECMAException)t; | |
Object ea = ee.getEcmaError();; | |
if (ea instanceof ScriptObjectMirror) { | |
ScriptObjectMirror som = (ScriptObjectMirror)ea; | |
String fileName = (String)som.getMember("fileName"); | |
int lineNumber = (int)som.getMember("lineNumber"); | |
ScriptException newex = new ScriptException(e.getMessage(), fileName, lineNumber); | |
startFuture.fail(newex); | |
throw newex; | |
} | |
} | |
throw e; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment