Java Code Examples for jdk.nashorn.api.scripting.NashornException

The following examples show how to use jdk.nashorn.api.scripting.NashornException. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: openjdk-8   Source File: ECMAErrors.java    License: GNU General Public License v2.0 6 votes vote down vote up
/**
 * Check if a stack trace element is in JavaScript
 *
 * @param frame frame
 *
 * @return true if frame is in the script
 */
public static boolean isScriptFrame(final StackTraceElement frame) {
    final String className = frame.getClassName();

    // Look for script package in class name (into which compiler puts generated code)
    if (className.startsWith(scriptPackage)) {
        final String source = frame.getFileName();
        /*
         * Make sure that it is not some Java code that Nashorn has in that package!
         * also, we don't want to report JavaScript code that lives in script engine implementation
         * We want to report only user's own scripts and not any of our own scripts like "engine.js"
         */
        return source != null && !source.endsWith(".java") && !source.contains(NashornException.ENGINE_SCRIPT_SOURCE_NAME);
    }
    return false;
}
 
Example 2
Source Project: openjdk-8-source   Source File: ECMAErrors.java    License: GNU General Public License v2.0 6 votes vote down vote up
/**
 * Check if a stack trace element is in JavaScript
 *
 * @param frame frame
 *
 * @return true if frame is in the script
 */
public static boolean isScriptFrame(final StackTraceElement frame) {
    final String className = frame.getClassName();

    // Look for script package in class name (into which compiler puts generated code)
    if (className.startsWith(scriptPackage)) {
        final String source = frame.getFileName();
        /*
         * Make sure that it is not some Java code that Nashorn has in that package!
         * also, we don't want to report JavaScript code that lives in script engine implementation
         * We want to report only user's own scripts and not any of our own scripts like "engine.js"
         */
        return source != null && !source.endsWith(".java") && !source.contains(NashornException.ENGINE_SCRIPT_SOURCE_NAME);
    }
    return false;
}
 
Example 3
Source Project: nashorn   Source File: NativeError.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * Nashorn extension: Error.prototype.getStackTrace()
 * "stack" property is an array typed value containing {@link StackTraceElement}
 * objects of JavaScript stack frames.
 *
 * @param self  self reference
 *
 * @return      stack trace as a script array.
 */
@Function(attributes = Attribute.NOT_ENUMERABLE)
public static Object getStackTrace(final Object self) {
    Global.checkObject(self);
    final ScriptObject sobj = (ScriptObject)self;
    final Object exception = ECMAException.getException(sobj);
    Object[] res;
    if (exception instanceof Throwable) {
        res = NashornException.getScriptFrames((Throwable)exception);
    } else {
        res = ScriptRuntime.EMPTY_ARRAY;
    }

    return new NativeArray(res);
}
 
Example 4
Source Project: openjdk-8   Source File: ECMAException.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * Get the file name for a {@code ScriptObject} representing an error
 *
 * @param errObj the error object
 * @return the file name, or undefined if wrapped exception is not a ParserException
 */
public static Object getFileName(final ScriptObject errObj) {
    final Object e = getException(errObj);
    if (e instanceof NashornException) {
        return ((NashornException)e).getFileName();
    } else if (e instanceof ScriptException) {
        return ((ScriptException)e).getFileName();
    }

    return UNDEFINED;
}
 
Example 5
Source Project: TencentKona-8   Source File: ECMAException.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * Get the line number for a {@code ScriptObject} representing an error
 *
 * @param errObj the error object
 * @return the line number, or undefined if wrapped exception is not a ParserException
 */
public static Object getLineNumber(final ScriptObject errObj) {
    final Object e = getException(errObj);
    if (e instanceof NashornException) {
        return ((NashornException)e).getLineNumber();
    } else if (e instanceof ScriptException) {
        return ((ScriptException)e).getLineNumber();
    }

    return UNDEFINED;
}
 
Example 6
Source Project: TencentKona-8   Source File: ECMAException.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * Get the column number for a {@code ScriptObject} representing an error
 *
 * @param errObj the error object
 * @return the column number, or undefined if wrapped exception is not a ParserException
 */
public static Object getColumnNumber(final ScriptObject errObj) {
    final Object e = getException(errObj);
    if (e instanceof NashornException) {
        return ((NashornException)e).getColumnNumber();
    } else if (e instanceof ScriptException) {
        return ((ScriptException)e).getColumnNumber();
    }

    return UNDEFINED;
}
 
Example 7
Source Project: TencentKona-8   Source File: ECMAException.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * Get the file name for a {@code ScriptObject} representing an error
 *
 * @param errObj the error object
 * @return the file name, or undefined if wrapped exception is not a ParserException
 */
public static Object getFileName(final ScriptObject errObj) {
    final Object e = getException(errObj);
    if (e instanceof NashornException) {
        return ((NashornException)e).getFileName();
    } else if (e instanceof ScriptException) {
        return ((ScriptException)e).getFileName();
    }

    return UNDEFINED;
}
 
Example 8
Source Project: TencentKona-8   Source File: Shell.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * Runs launches "fx:bootstrap.js" with the given JavaScript files provided
 * as arguments.
 *
 * @param context the nashorn context
 * @param global the global scope
 * @param files the list of script files to provide
 *
 * @return error code
 * @throws IOException when any script file read results in I/O error
 */
private static int runFXScripts(final Context context, final Global global, final List<String> files) throws IOException {
    final Global oldGlobal = Context.getGlobal();
    final boolean globalChanged = (oldGlobal != global);
    try {
        if (globalChanged) {
            Context.setGlobal(global);
        }

        global.addOwnProperty("$GLOBAL", Property.NOT_ENUMERABLE, global);
        global.addOwnProperty("$SCRIPTS", Property.NOT_ENUMERABLE, files);
        context.load(global, "fx:bootstrap.js");
    } catch (final NashornException e) {
        context.getErrorManager().error(e.toString());
        if (context.getEnv()._dump_on_error) {
            e.printStackTrace(context.getErr());
        }

        return RUNTIME_ERROR;
    } finally {
        context.getOut().flush();
        context.getErr().flush();
        if (globalChanged) {
            Context.setGlobal(oldGlobal);
        }
    }

    return SUCCESS;
}
 
Example 9
Source Project: jdk8u60   Source File: NativeError.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * Nashorn extension: Error.prototype.getStackTrace()
 * "stack" property is an array typed value containing {@link StackTraceElement}
 * objects of JavaScript stack frames.
 *
 * @param self  self reference
 *
 * @return      stack trace as a script array.
 */
@Function(attributes = Attribute.NOT_ENUMERABLE)
public static Object getStackTrace(final Object self) {
    final ScriptObject sobj = Global.checkObject(self);
    final Object exception = ECMAException.getException(sobj);
    Object[] res;
    if (exception instanceof Throwable) {
        res = NashornException.getScriptFrames((Throwable)exception);
    } else {
        res = ScriptRuntime.EMPTY_ARRAY;
    }

    return new NativeArray(res);
}
 
Example 10
Source Project: jdk8u60   Source File: ECMAException.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * Get the line number for a {@code ScriptObject} representing an error
 *
 * @param errObj the error object
 * @return the line number, or undefined if wrapped exception is not a ParserException
 */
public static Object getLineNumber(final ScriptObject errObj) {
    final Object e = getException(errObj);
    if (e instanceof NashornException) {
        return ((NashornException)e).getLineNumber();
    } else if (e instanceof ScriptException) {
        return ((ScriptException)e).getLineNumber();
    }

    return UNDEFINED;
}
 
Example 11
Source Project: jdk8u60   Source File: ECMAException.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * Get the column number for a {@code ScriptObject} representing an error
 *
 * @param errObj the error object
 * @return the column number, or undefined if wrapped exception is not a ParserException
 */
public static Object getColumnNumber(final ScriptObject errObj) {
    final Object e = getException(errObj);
    if (e instanceof NashornException) {
        return ((NashornException)e).getColumnNumber();
    } else if (e instanceof ScriptException) {
        return ((ScriptException)e).getColumnNumber();
    }

    return UNDEFINED;
}
 
Example 12
Source Project: jdk8u60   Source File: Shell.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * Runs launches "fx:bootstrap.js" with the given JavaScript files provided
 * as arguments.
 *
 * @param context the nashorn context
 * @param global the global scope
 * @param files the list of script files to provide
 *
 * @return error code
 * @throws IOException when any script file read results in I/O error
 */
private static int runFXScripts(final Context context, final Global global, final List<String> files) throws IOException {
    final Global oldGlobal = Context.getGlobal();
    final boolean globalChanged = (oldGlobal != global);
    try {
        if (globalChanged) {
            Context.setGlobal(global);
        }

        global.addOwnProperty("$GLOBAL", Property.NOT_ENUMERABLE, global);
        global.addOwnProperty("$SCRIPTS", Property.NOT_ENUMERABLE, files);
        context.load(global, "fx:bootstrap.js");
    } catch (final NashornException e) {
        context.getErrorManager().error(e.toString());
        if (context.getEnv()._dump_on_error) {
            e.printStackTrace(context.getErr());
        }

        return RUNTIME_ERROR;
    } finally {
        context.getOut().flush();
        context.getErr().flush();
        if (globalChanged) {
            Context.setGlobal(oldGlobal);
        }
    }

    return SUCCESS;
}
 
Example 13
Source Project: jdk8u_nashorn   Source File: Shell.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * Runs launches "fx:bootstrap.js" with the given JavaScript files provided
 * as arguments.
 *
 * @param context the nashorn context
 * @param global the global scope
 * @param files the list of script files to provide
 *
 * @return error code
 * @throws IOException when any script file read results in I/O error
 */
private static int runFXScripts(final Context context, final Global global, final List<String> files) throws IOException {
    final Global oldGlobal = Context.getGlobal();
    final boolean globalChanged = (oldGlobal != global);
    try {
        if (globalChanged) {
            Context.setGlobal(global);
        }

        global.addOwnProperty("$GLOBAL", Property.NOT_ENUMERABLE, global);
        global.addOwnProperty("$SCRIPTS", Property.NOT_ENUMERABLE, files);
        context.load(global, "fx:bootstrap.js");
    } catch (final NashornException e) {
        context.getErrorManager().error(e.toString());
        if (context.getEnv()._dump_on_error) {
            e.printStackTrace(context.getErr());
        }

        return RUNTIME_ERROR;
    } finally {
        context.getOut().flush();
        context.getErr().flush();
        if (globalChanged) {
            Context.setGlobal(oldGlobal);
        }
    }

    return SUCCESS;
}
 
Example 14
Source Project: openjdk-jdk8u   Source File: ECMAException.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * Get the line number for a {@code ScriptObject} representing an error
 *
 * @param errObj the error object
 * @return the line number, or undefined if wrapped exception is not a ParserException
 */
public static Object getLineNumber(final ScriptObject errObj) {
    final Object e = getException(errObj);
    if (e instanceof NashornException) {
        return ((NashornException)e).getLineNumber();
    } else if (e instanceof ScriptException) {
        return ((ScriptException)e).getLineNumber();
    }

    return UNDEFINED;
}
 
Example 15
Source Project: openjdk-8-source   Source File: Shell.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * Runs launches "fx:bootstrap.js" with the given JavaScript files provided
 * as arguments.
 *
 * @param context the nashorn context
 * @param global the global scope
 * @param files the list of script files to provide
 *
 * @return error code
 * @throws IOException when any script file read results in I/O error
 */
private static int runFXScripts(final Context context, final ScriptObject global, final List<String> files) throws IOException {
    final ScriptObject oldGlobal = Context.getGlobal();
    final boolean globalChanged = (oldGlobal != global);
    try {
        if (globalChanged) {
            Context.setGlobal(global);
        }

        global.addOwnProperty("$GLOBAL", Property.NOT_ENUMERABLE, global);
        global.addOwnProperty("$SCRIPTS", Property.NOT_ENUMERABLE, files);
        context.load(global, "fx:bootstrap.js");
    } catch (final NashornException e) {
        context.getErrorManager().error(e.toString());
        if (context.getEnv()._dump_on_error) {
            e.printStackTrace(context.getErr());
        }

        return RUNTIME_ERROR;
    } finally {
        context.getOut().flush();
        context.getErr().flush();
        if (globalChanged) {
            Context.setGlobal(oldGlobal);
        }
    }

    return SUCCESS;
}
 
Example 16
Source Project: openjdk-jdk8u   Source File: Shell.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * Runs launches "fx:bootstrap.js" with the given JavaScript files provided
 * as arguments.
 *
 * @param context the nashorn context
 * @param global the global scope
 * @param files the list of script files to provide
 *
 * @return error code
 * @throws IOException when any script file read results in I/O error
 */
private static int runFXScripts(final Context context, final Global global, final List<String> files) throws IOException {
    final Global oldGlobal = Context.getGlobal();
    final boolean globalChanged = (oldGlobal != global);
    try {
        if (globalChanged) {
            Context.setGlobal(global);
        }

        global.addOwnProperty("$GLOBAL", Property.NOT_ENUMERABLE, global);
        global.addOwnProperty("$SCRIPTS", Property.NOT_ENUMERABLE, files);
        context.load(global, "fx:bootstrap.js");
    } catch (final NashornException e) {
        context.getErrorManager().error(e.toString());
        if (context.getEnv()._dump_on_error) {
            e.printStackTrace(context.getErr());
        }

        return RUNTIME_ERROR;
    } finally {
        context.getOut().flush();
        context.getErr().flush();
        if (globalChanged) {
            Context.setGlobal(oldGlobal);
        }
    }

    return SUCCESS;
}
 
Example 17
Source Project: openjdk-8   Source File: Shell.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * Runs launches "fx:bootstrap.js" with the given JavaScript files provided
 * as arguments.
 *
 * @param context the nashorn context
 * @param global the global scope
 * @param files the list of script files to provide
 *
 * @return error code
 * @throws IOException when any script file read results in I/O error
 */
private static int runFXScripts(final Context context, final ScriptObject global, final List<String> files) throws IOException {
    final ScriptObject oldGlobal = Context.getGlobal();
    final boolean globalChanged = (oldGlobal != global);
    try {
        if (globalChanged) {
            Context.setGlobal(global);
        }

        global.addOwnProperty("$GLOBAL", Property.NOT_ENUMERABLE, global);
        global.addOwnProperty("$SCRIPTS", Property.NOT_ENUMERABLE, files);
        context.load(global, "fx:bootstrap.js");
    } catch (final NashornException e) {
        context.getErrorManager().error(e.toString());
        if (context.getEnv()._dump_on_error) {
            e.printStackTrace(context.getErr());
        }

        return RUNTIME_ERROR;
    } finally {
        context.getOut().flush();
        context.getErr().flush();
        if (globalChanged) {
            Context.setGlobal(oldGlobal);
        }
    }

    return SUCCESS;
}
 
Example 18
Source Project: jdk8u_nashorn   Source File: ECMAException.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * Get the column number for a {@code ScriptObject} representing an error
 *
 * @param errObj the error object
 * @return the column number, or undefined if wrapped exception is not a ParserException
 */
public static Object getColumnNumber(final ScriptObject errObj) {
    final Object e = getException(errObj);
    if (e instanceof NashornException) {
        return ((NashornException)e).getColumnNumber();
    } else if (e instanceof ScriptException) {
        return ((ScriptException)e).getColumnNumber();
    }

    return UNDEFINED;
}
 
Example 19
/**
 * Get the file name for a {@code ScriptObject} representing an error
 *
 * @param errObj the error object
 * @return the file name, or undefined if wrapped exception is not a ParserException
 */
public static Object getFileName(final ScriptObject errObj) {
    final Object e = getException(errObj);
    if (e instanceof NashornException) {
        return ((NashornException)e).getFileName();
    } else if (e instanceof ScriptException) {
        return ((ScriptException)e).getFileName();
    }

    return UNDEFINED;
}
 
Example 20
Source Project: openjdk-jdk8u-backup   Source File: Shell.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * Runs launches "fx:bootstrap.js" with the given JavaScript files provided
 * as arguments.
 *
 * @param context the nashorn context
 * @param global the global scope
 * @param files the list of script files to provide
 *
 * @return error code
 * @throws IOException when any script file read results in I/O error
 */
private static int runFXScripts(final Context context, final Global global, final List<String> files) throws IOException {
    final Global oldGlobal = Context.getGlobal();
    final boolean globalChanged = (oldGlobal != global);
    try {
        if (globalChanged) {
            Context.setGlobal(global);
        }

        global.addOwnProperty("$GLOBAL", Property.NOT_ENUMERABLE, global);
        global.addOwnProperty("$SCRIPTS", Property.NOT_ENUMERABLE, files);
        context.load(global, "fx:bootstrap.js");
    } catch (final NashornException e) {
        context.getErrorManager().error(e.toString());
        if (context.getEnv()._dump_on_error) {
            e.printStackTrace(context.getErr());
        }

        return RUNTIME_ERROR;
    } finally {
        context.getOut().flush();
        context.getErr().flush();
        if (globalChanged) {
            Context.setGlobal(oldGlobal);
        }
    }

    return SUCCESS;
}
 
Example 21
Source Project: nashorn   Source File: ECMAException.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * Get the line number for a {@code ScriptObject} representing an error
 *
 * @param errObj the error object
 * @return the line number, or undefined if wrapped exception is not a ParserException
 */
public static Object getLineNumber(final ScriptObject errObj) {
    final Object e = getException(errObj);
    if (e instanceof NashornException) {
        return ((NashornException)e).getLineNumber();
    } else if (e instanceof ScriptException) {
        return ((ScriptException)e).getLineNumber();
    }

    return UNDEFINED;
}
 
Example 22
Source Project: openjdk-jdk9   Source File: ParserImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
@Override
public CompilationUnitTree parse(final File file, final DiagnosticListener listener) throws IOException, NashornException {
    if (moduleMode) {
        return parseModule(file, listener);
    }
    final Source src = Source.sourceFor(Objects.requireNonNull(file).getName(), file);
    return translate(makeParser(src, listener).parse());
}
 
Example 23
Source Project: nashorn   Source File: ECMAException.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * Get the file name for a {@code ScriptObject} representing an error
 *
 * @param errObj the error object
 * @return the file name, or undefined if wrapped exception is not a ParserException
 */
public static Object getFileName(final ScriptObject errObj) {
    final Object e = getException(errObj);
    if (e instanceof NashornException) {
        return ((NashornException)e).getFileName();
    } else if (e instanceof ScriptException) {
        return ((ScriptException)e).getFileName();
    }

    return UNDEFINED;
}
 
Example 24
Source Project: nashorn   Source File: Shell.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * Runs launches "fx:bootstrap.js" with the given JavaScript files provided
 * as arguments.
 *
 * @param context the nashorn context
 * @param global the global scope
 * @param files the list of script files to provide
 *
 * @return error code
 * @throws IOException when any script file read results in I/O error
 */
private static int runFXScripts(final Context context, final ScriptObject global, final List<String> files) throws IOException {
    final ScriptObject oldGlobal = Context.getGlobal();
    final boolean globalChanged = (oldGlobal != global);
    try {
        if (globalChanged) {
            Context.setGlobal(global);
        }

        global.addOwnProperty("$GLOBAL", Property.NOT_ENUMERABLE, global);
        global.addOwnProperty("$SCRIPTS", Property.NOT_ENUMERABLE, files);
        context.load(global, "fx:bootstrap.js");
    } catch (final NashornException e) {
        context.getErrorManager().error(e.toString());
        if (context.getEnv()._dump_on_error) {
            e.printStackTrace(context.getErr());
        }

        return RUNTIME_ERROR;
    } finally {
        context.getOut().flush();
        context.getErr().flush();
        if (globalChanged) {
            Context.setGlobal(oldGlobal);
        }
    }

    return SUCCESS;
}
 
Example 25
Source Project: openjdk-jdk9   Source File: ParserImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
@Override
public CompilationUnitTree parse(final String name, final Reader reader, final DiagnosticListener listener) throws IOException, NashornException {
    if (moduleMode) {
        return parseModule(name, reader, listener);
    }
    final Source src = Source.sourceFor(Objects.requireNonNull(name), Objects.requireNonNull(reader));
    return translate(makeParser(src, listener).parse());
}
 
Example 26
Source Project: openjdk-jdk9   Source File: ParserImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
@Override
public CompilationUnitTree parse(final String name, final String code, final DiagnosticListener listener) throws NashornException {
    if (moduleMode) {
        return parseModule(name, code, listener);
    }
    final Source src = Source.sourceFor(name, code);
    return translate(makeParser(src, listener).parse());
}
 
Example 27
Source Project: openjdk-jdk9   Source File: ParserImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
@Override
public CompilationUnitTree parse(final ScriptObjectMirror scriptObj, final DiagnosticListener listener) throws NashornException {
    if (moduleMode) {
        return parseModule(scriptObj, listener);
    }
    final Map<?, ?> map = Objects.requireNonNull(scriptObj);
    if (map.containsKey("script") && map.containsKey("name")) {
        final String script = JSType.toString(map.get("script"));
        final String name = JSType.toString(map.get("name"));
        final Source src = Source.sourceFor(name, script);
        return translate(makeParser(src, listener).parse());
    } else {
        throw new IllegalArgumentException("can't find 'script' and 'name' properties");
    }
}
 
Example 28
Source Project: jdk8u_nashorn   Source File: ECMAException.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * Get the file name for a {@code ScriptObject} representing an error
 *
 * @param errObj the error object
 * @return the file name, or undefined if wrapped exception is not a ParserException
 */
public static Object getFileName(final ScriptObject errObj) {
    final Object e = getException(errObj);
    if (e instanceof NashornException) {
        return ((NashornException)e).getFileName();
    } else if (e instanceof ScriptException) {
        return ((ScriptException)e).getFileName();
    }

    return UNDEFINED;
}
 
Example 29
Source Project: openjdk-jdk9   Source File: ParserImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
private CompilationUnitTree parseModule(final ScriptObjectMirror scriptObj, final DiagnosticListener listener) throws NashornException {
    final Map<?, ?> map = Objects.requireNonNull(scriptObj);
    if (map.containsKey("script") && map.containsKey("name")) {
        final String script = JSType.toString(map.get("script"));
        final String name = JSType.toString(map.get("name"));
        final Source src = Source.sourceFor(name, script);
        return makeModule(src, listener);
    } else {
        throw new IllegalArgumentException("can't find 'script' and 'name' properties");
    }
}
 
Example 30
Source Project: openjdk-8   Source File: ECMAException.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * Get the line number for a {@code ScriptObject} representing an error
 *
 * @param errObj the error object
 * @return the line number, or undefined if wrapped exception is not a ParserException
 */
public static Object getLineNumber(final ScriptObject errObj) {
    final Object e = getException(errObj);
    if (e instanceof NashornException) {
        return ((NashornException)e).getLineNumber();
    } else if (e instanceof ScriptException) {
        return ((ScriptException)e).getLineNumber();
    }

    return UNDEFINED;
}