Show error log when invoking a missing native method.

This commit is contained in:
Yuan Xulei 2015-01-21 20:59:56 +08:00
Родитель ff502587ee
Коммит 41b9e89be3
2 изменённых файлов: 2 добавлений и 8 удалений

Просмотреть файл

@ -1171,7 +1171,7 @@ module J2ME {
// Some Native MethodInfos are constructed but never called;
// that's fine, unless we actually try to call them.
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) {

Просмотреть файл

@ -53,7 +53,7 @@ function warn(message?: any, ...optionalParams: any[]): void {
if (inBrowser) {
console.warn.apply(console, arguments);
} 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) {
//if (!inBrowser) {
// warn(message + "\n\nStack Trace:\n" + Debug.backtrace());
//} else {
// warn(message);
//}
throw new Error(message);
}
@ -311,7 +306,6 @@ module J2ME {
}
export function notImplemented(message: string) {
log("release: " + release);
release || Debug.assert(false, "Not Implemented " + message);
}