зеркало из https://github.com/mozilla/pjs.git
Ignore any exception during script class initialization unless it is an instance of RhinoException. In this way lazily class loading or incompatible with the current JVMs jars will simply hide the script variables.
This commit is contained in:
Родитель
46f780a5db
Коммит
a41b3ec13e
|
@ -83,10 +83,14 @@ public final class LazilyLoadedCtor {
|
|||
try {
|
||||
ScriptableObject.defineClass(obj, cl, sealed);
|
||||
isReplaced = true;
|
||||
} catch (RhinoException e) {
|
||||
throw e;
|
||||
} catch (SecurityException ex) {
|
||||
removeOnError = true;
|
||||
} catch (Exception e) {
|
||||
throw Context.throwAsScriptRuntimeEx(e);
|
||||
} catch (Throwable ex) {
|
||||
// Ignore any other erors. Due to lazily class loading
|
||||
// it may indicate absence of some necessary classes.
|
||||
removeOnError = true;
|
||||
}
|
||||
}
|
||||
if (removeOnError) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче