From 0083a07345feec2750f9d6900db9b1ca035536b8 Mon Sep 17 00:00:00 2001 From: Mark Haines Date: Wed, 24 Jun 2015 10:32:42 +0100 Subject: [PATCH] Throw an Error object rather than a string in the javascript bindings. --- javascript/axolotl_post.js | 4 ++-- javascript/build.py | 0 2 files changed, 2 insertions(+), 2 deletions(-) mode change 100644 => 100755 javascript/build.py 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 old mode 100644 new mode 100755