зеркало из https://github.com/mozilla/pluotsorbet.git
Show error log when invoking a missing native method.
This commit is contained in:
Родитель
ff502587ee
Коммит
41b9e89be3
|
@ -1171,7 +1171,7 @@ module J2ME {
|
||||||
// Some Native MethodInfos are constructed but never called;
|
// Some Native MethodInfos are constructed but never called;
|
||||||
// that's fine, unless we actually try to call them.
|
// that's fine, unless we actually try to call them.
|
||||||
return function missingImplementation() {
|
return function missingImplementation() {
|
||||||
release || assert (false, "Method " + methodInfo.name + " is native but does not have an implementation.");
|
stderrWriter.errorLn("implKey " + methodInfo.name + " is native but does not have an implementation.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (implKey in Override) {
|
} else if (implKey in Override) {
|
||||||
|
|
|
@ -53,7 +53,7 @@ function warn(message?: any, ...optionalParams: any[]): void {
|
||||||
if (inBrowser) {
|
if (inBrowser) {
|
||||||
console.warn.apply(console, arguments);
|
console.warn.apply(console, arguments);
|
||||||
} else {
|
} else {
|
||||||
jsGlobal.print(J2ME.IndentingWriter.RED + message + J2ME.IndentingWriter.ENDC);
|
jsGlobal.print(J2ME.IndentingWriter.YELLOW + message + J2ME.IndentingWriter.ENDC);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -274,11 +274,6 @@ module J2ME {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function error(message: string) {
|
export function error(message: string) {
|
||||||
//if (!inBrowser) {
|
|
||||||
// warn(message + "\n\nStack Trace:\n" + Debug.backtrace());
|
|
||||||
//} else {
|
|
||||||
// warn(message);
|
|
||||||
//}
|
|
||||||
throw new Error(message);
|
throw new Error(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -311,7 +306,6 @@ module J2ME {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function notImplemented(message: string) {
|
export function notImplemented(message: string) {
|
||||||
log("release: " + release);
|
|
||||||
release || Debug.assert(false, "Not Implemented " + message);
|
release || Debug.assert(false, "Not Implemented " + message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче