Package org.mozilla.javascript

Examples of org.mozilla.javascript.EcmaError.lineNumber()


    if (e instanceof JavaScriptException) {
      message.append(toJson(((JavaScriptException) e).getValue()));
    } else if (e instanceof EcmaError) {
      final EcmaError ecmaError = (EcmaError) e;
      message.append(String.format("Error message: %s at line: %s. \nSource: %s", ecmaError.getErrorMessage(),
          ecmaError.lineNumber(), ecmaError.lineSource()));
    } else {
      message.append(e.getMessage());
    }
    return message.toString();
  }
View Full Code Here


      }
    } else if (ex instanceof EcmaError) {
      EcmaError ecmaError = (EcmaError) ex;
      error.column = ecmaError.columnNumber();
      error.filename = ecmaError.sourceName();
      error.line = ecmaError.lineNumber();
      error.message = ecmaError.details();
    } else {
      logger.trace("Unknown exception", ex);
    }
    // set defaults
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.