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 /javascript/axolotl_post.js | |
parent | 07072912cdf680766d8c36f6333b77f9aa4f027c (diff) |
Throw an Error object rather than a string in the javascript bindings.
Diffstat (limited to 'javascript/axolotl_post.js')
-rw-r--r-- | javascript/axolotl_post.js | 4 |
1 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; } |