Package jdk.nashorn.api.scripting

Examples of jdk.nashorn.api.scripting.NashornException


        } catch (Throwable err){
            if (err instanceof NashornException){
                if(Logger.isTraceEnabled())Logger.trace("Error in script");

                Throwable cause = err.getCause();
                NashornException exc =((NashornException) err);
                String scriptStack = NashornException.getScriptStackString(exc);
                scriptStack = ExceptionUtils.getFullStackTrace(exc);
                int columnNumber = exc.getColumnNumber();
                int lineNumber = exc.getLineNumber();
                String fileName = exc.getFileName();
                String message = exc.getMessage();
                String errorMessage = String.format("ScriptError: '%s' at: <%s>%d:%d\n%s",message,fileName,lineNumber,columnNumber,scriptStack);
                throw new ScriptEvalException(errorMessage,err);
            }
            throw new ScriptEvalException(ExceptionUtils.getFullStackTrace(err),err);
        }
View Full Code Here

TOP

Related Classes of jdk.nashorn.api.scripting.NashornException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.