Index: src/JsError.cpp |
diff --git a/src/JsError.cpp b/src/JsError.cpp |
index 29ea66a74df122e399c4db4d87c10eb26fa78647..3af341f10e16bfa619faa7af87dfd7e136170a77 100644 |
--- a/src/JsError.cpp |
+++ b/src/JsError.cpp |
@@ -17,26 +17,25 @@ |
#include "JsError.h" |
-namespace |
-{ |
- std::string ExceptionToString(const v8::Handle<v8::Value>& exception, |
- const v8::Handle<v8::Message>& message) |
- { |
- std::stringstream error; |
- error << *v8::String::Utf8Value(exception); |
- if (!message.IsEmpty()) |
- { |
- error << " at "; |
- error << *v8::String::Utf8Value(message->GetScriptResourceName()); |
- error << ":"; |
- error << message->GetLineNumber(); |
- } |
- return error.str(); |
- } |
-} |
+using namespace AdblockPlus; |
-AdblockPlus::JsError::JsError(const v8::Handle<v8::Value>& exception, |
+JsError::JsError(const v8::Handle<v8::Value>& exception, |
const v8::Handle<v8::Message>& message) |
: std::runtime_error(ExceptionToString(exception, message)) |
{ |
} |
+ |
+std::string JsError::ExceptionToString(const v8::Handle<v8::Value>& exception, |
+ const v8::Handle<v8::Message>& message) |
+{ |
+ std::stringstream error; |
+ error << *v8::String::Utf8Value(exception); |
+ if (!message.IsEmpty()) |
+ { |
+ error << " at "; |
+ error << *v8::String::Utf8Value(message->GetScriptResourceName()); |
+ error << ":"; |
+ error << message->GetLineNumber(); |
+ } |
+ return error.str(); |
+} |