From 290234cb8a89e4220277da2a28c52cf9faf8bbc3 Mon Sep 17 00:00:00 2001 From: Scott Kyle Date: Mon, 12 Oct 2015 23:17:02 -0700 Subject: [PATCH] RJSException no longer requires JS strings Since most often some kind of JS Error is passed into RJSException, it would mask the original error by throwing a new exception because that Error was not a string! --- src/RJSUtil.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/RJSUtil.hpp b/src/RJSUtil.hpp index 2d15ee9e..fc90edb7 100644 --- a/src/RJSUtil.hpp +++ b/src/RJSUtil.hpp @@ -86,7 +86,7 @@ inline void RJSValidateArgumentRange(size_t argumentCount, size_t min, size_t ma class RJSException : public std::runtime_error { public: - RJSException(JSContextRef ctx, JSValueRef &ex) : std::runtime_error(RJSValidatedStringForValue(ctx, ex, "exception")), + RJSException(JSContextRef ctx, JSValueRef &ex) : std::runtime_error(RJSStringForValue(ctx, ex)), m_jsException(ex) {} JSValueRef exception() { return m_jsException; }