Commit 0083a073 authored by Mark Haines's avatar Mark Haines
Browse files

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

parent 07072912
......@@ -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;
}
......
File mode changed from 100644 to 100755
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment