зеркало из https://github.com/mozilla/pluotsorbet.git
Merge pull request #49 from marco-c/report_exception_on_missing_native
Raise RuntimeException on missing native method
This commit is contained in:
Коммит
c5761cdf0d
|
@ -9,8 +9,11 @@ Native.invoke = function(ctx, methodInfo) {
|
|||
if (!methodInfo.native) {
|
||||
var key = methodInfo.classInfo.className + "." + methodInfo.name + "." + methodInfo.signature;
|
||||
methodInfo.native = Native[key];
|
||||
if (!methodInfo.native)
|
||||
console.log(key);
|
||||
if (!methodInfo.native) {
|
||||
console.log("Missing native: " + key);
|
||||
ctx.raiseException("java/lang/RuntimeException", key + " not found");
|
||||
return;
|
||||
}
|
||||
}
|
||||
methodInfo.native.call(null, ctx, ctx.current().stack);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче