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!
This commit is contained in:
Scott Kyle 2015-10-12 23:17:02 -07:00
parent d996147b09
commit 290234cb8a
1 changed files with 1 additions and 1 deletions

View File

@ -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; }