biojs-vis-pdbviewer
Version:
A BioJS 2.0 component to view protein structures
28 lines (27 loc) • 813 B
JavaScript
Clazz.declarePackage ("JS");
Clazz.load (["java.lang.Exception"], "JS.ScriptException", null, function () {
c$ = Clazz.decorateAsClass (function () {
this.eval = null;
this.message = null;
this.untranslated = null;
this.isError = false;
Clazz.instantialize (this, arguments);
}, JS, "ScriptException", Exception);
Clazz.makeConstructor (c$,
function (se, msg, untranslated, isError) {
Clazz.superConstructor (this, JS.ScriptException, []);
this.eval = se;
this.message = msg;
this.isError = isError;
if (!isError) return;
this.eval.setException (this, msg, untranslated);
}, "JS.ScriptError,~S,~S,~B");
Clazz.defineMethod (c$, "getErrorMessageUntranslated",
function () {
return this.untranslated;
});
Clazz.overrideMethod (c$, "toString",
function () {
return this.message;
});
});