summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Examples/javascript/exception/runme.js2
-rw-r--r--Lib/javascript/v8/javascriptrun.swg2
2 files changed, 2 insertions, 2 deletions
diff --git a/Examples/javascript/exception/runme.js b/Examples/javascript/exception/runme.js
index 8c583f81f..646a33dbe 100644
--- a/Examples/javascript/exception/runme.js
+++ b/Examples/javascript/exception/runme.js
@@ -45,7 +45,7 @@ catch(error){
if(error == -1) {
console.log("t.hosed() did not throw");
} else {
- console.log("successfully caught throw in Test::hosed() :" + error + " " + error.code + " " + error.msg);
+ console.log("successfully caught throw in Test::hosed() :" + error);
}
}
diff --git a/Lib/javascript/v8/javascriptrun.swg b/Lib/javascript/v8/javascriptrun.swg
index a6ccd1e20..f76270855 100644
--- a/Lib/javascript/v8/javascriptrun.swg
+++ b/Lib/javascript/v8/javascriptrun.swg
@@ -97,7 +97,7 @@ SWIGINTERN void SWIG_V8_Raise(const char *msg) {
}
SWIGINTERN void SWIG_V8_Raise(SWIGV8_VALUE obj, const char *msg) {
- SWIGV8_THROW_EXCEPTION(obj);
+ SWIGV8_THROW_EXCEPTION(v8::Exception::Error(SWIGV8_TO_STRING(obj)));
}