Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (101)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (309)
Collections:
Other Resources:
Rhino JavaScript Java Library Source Code
Rhino JavaScript Java Library is an open-source implementation of JavaScript written entirely in Java.
Rhino JavaScript Java Library Source Code files are provided in binary package (rhino-1.7.14.zip).
You can also browse the source code below:
✍: FYIcenter.com
⏎ org/mozilla/javascript/JavaScriptException.java
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ // API class package org.mozilla.javascript; /** * Java reflection of JavaScript exceptions. Instances of this class are thrown by the JavaScript * 'throw' keyword. * * @author Mike McCabe */ public class JavaScriptException extends RhinoException { private static final long serialVersionUID = -7666130513694669293L; /** * @deprecated Use {@link WrappedException#WrappedException(Throwable)} to report exceptions in * Java code. */ @Deprecated public JavaScriptException(Object value) { this(value, "", 0); } /** * Create a JavaScript exception wrapping the given JavaScript value * * @param value the JavaScript value thrown. */ public JavaScriptException(Object value, String sourceName, int lineNumber) { recordErrorOrigin(sourceName, lineNumber, null, 0); this.value = value; // Fill in fileName and lineNumber automatically when not specified // explicitly, see Bugzilla issue #342807 if (value instanceof NativeError && Context.getContext().hasFeature(Context.FEATURE_LOCATION_INFORMATION_IN_ERROR)) { NativeError error = (NativeError) value; if (!error.has("fileName", error)) { error.put("fileName", error, sourceName); } if (!error.has("lineNumber", error)) { error.put("lineNumber", error, Integer.valueOf(lineNumber)); } // set stack property, see bug #549604 error.setStackProvider(this); } // generate details string when exception is first created, // since details() may be called later from a different thread // (e.g. when printing failed test results), which // would cause ScriptRuntime.toString to fail. this.details = getDetails(); } @Override public String details() { return this.details; } public String getDetails() { if (value == null) { return "null"; } else if (value instanceof NativeError) { return value.toString(); } try { return ScriptRuntime.toString(value); } catch (RuntimeException rte) { // ScriptRuntime.toString may throw a RuntimeException if (value instanceof Scriptable) { return ScriptRuntime.defaultObjectToString((Scriptable) value); } return value.toString(); } } /** @return the value wrapped by this exception */ public Object getValue() { return value; } /** @deprecated Use {@link RhinoException#sourceName()} from the super class. */ @Deprecated public String getSourceName() { return sourceName(); } /** @deprecated Use {@link RhinoException#lineNumber()} from the super class. */ @Deprecated public int getLineNumber() { return lineNumber(); } private Object value; private String details; }
⏎ org/mozilla/javascript/JavaScriptException.java
Or download all of them as a single archive file:
File name: rhino-1.7.14-sources.jar File size: 1029165 bytes Release date: 2022-01-06 Download
⇒ Example code to Test rhino-runtime-1.7.14.jar
⇐ Download Rhino JavaScript Binary Package
2022-05-03, 34674👍, 1💬
Popular Posts:
The Web Services Description Language for Java Toolkit (WSDL4J), Release 1.6.2, allows the creation,...
Apache BCEL Source Code Files are inside the Apache BCEL source package file like bcel-6.5.0-src.zip...
Snappy-Java is a Java port of the "snappy", a fast C++ compresser/decompresser developed by Google. ...
Commons DBCP provides Database Connection Pooling. JAR File Size and Download Location: File name: c...
commons-collections4-4.2 -sources.jaris the source JAR file for Apache Commons Collections 4.2, whic...