Throw an Error object rather than a string in the javascript bindings.

This commit is contained in:
Mark Haines 2015-06-24 10:32:42 +01:00
parent 07072912cd
commit 0083a07345
2 changed files with 2 additions and 2 deletions

View file

@ -42,7 +42,7 @@ function account_method(wrapped) {
var message = Pointer_stringify(
Module['_axolotl_account_last_error'](arguments[0])
);
throw "AXOLOTL." + message;
throw new Error("AXOLOTL." + message);
}
return result;
}
@ -121,7 +121,7 @@ function session_method(wrapped) {
var message = Pointer_stringify(
Module['_axolotl_session_last_error'](arguments[0])
);
throw "AXOLOTL." + message;
throw new Error("AXOLOTL." + message);
}
return result;
}

0
javascript/build.py Normal file → Executable file
View file