Throw an Error object rather than a string in the javascript bindings.
This commit is contained in:
parent
07072912cd
commit
0083a07345
2 changed files with 2 additions and 2 deletions
|
@ -42,7 +42,7 @@ function account_method(wrapped) {
|
||||||
var message = Pointer_stringify(
|
var message = Pointer_stringify(
|
||||||
Module['_axolotl_account_last_error'](arguments[0])
|
Module['_axolotl_account_last_error'](arguments[0])
|
||||||
);
|
);
|
||||||
throw "AXOLOTL." + message;
|
throw new Error("AXOLOTL." + message);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -121,7 +121,7 @@ function session_method(wrapped) {
|
||||||
var message = Pointer_stringify(
|
var message = Pointer_stringify(
|
||||||
Module['_axolotl_session_last_error'](arguments[0])
|
Module['_axolotl_session_last_error'](arguments[0])
|
||||||
);
|
);
|
||||||
throw "AXOLOTL." + message;
|
throw new Error("AXOLOTL." + message);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
0
javascript/build.py
Normal file → Executable file
0
javascript/build.py
Normal file → Executable file
Loading…
Reference in a new issue