diff options
author | Mark Haines <mark.haines@matrix.org> | 2015-06-24 10:32:42 +0100 |
---|---|---|
committer | Mark Haines <mark.haines@matrix.org> | 2015-06-24 10:32:51 +0100 |
commit | 0083a07345feec2750f9d6900db9b1ca035536b8 (patch) | |
tree | 22465fc900b956e492a62ca33cce1713f7410d64 | |
parent | 07072912cdf680766d8c36f6333b77f9aa4f027c (diff) |
Throw an Error object rather than a string in the javascript bindings.
-rw-r--r-- | javascript/axolotl_post.js | 4 | ||||
-rwxr-xr-x[-rw-r--r--] | javascript/build.py | 0 |
2 files changed, 2 insertions, 2 deletions
diff --git a/javascript/axolotl_post.js b/javascript/axolotl_post.js index 7902725..16294fb 100644 --- a/javascript/axolotl_post.js +++ b/javascript/axolotl_post.js @@ -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; } diff --git a/javascript/build.py b/javascript/build.py index 2b754e9..2b754e9 100644..100755 --- a/javascript/build.py +++ b/javascript/build.py |