Index: include/AdblockPlus/JsEngine.h |
diff --git a/include/AdblockPlus/JsEngine.h b/include/AdblockPlus/JsEngine.h |
index 19d2586ea9a3515b8806d4edb5f26448e6e16012..9f371ec0795db246650d45dd46e2940708afff2a 100644 |
--- a/include/AdblockPlus/JsEngine.h |
+++ b/include/AdblockPlus/JsEngine.h |
@@ -93,6 +93,21 @@ namespace AdblockPlus |
typedef std::map<std::string, EventCallback> EventMap; |
/** |
+ * Exception which is thrown when JsEngine is not available. |
+ * |
+ * For instance, if JsEngine is already released but someone calls a method |
+ * on JsValue this exception will be thrown. |
+ */ |
+ class JsEngineNotAvailableException : public std::runtime_error |
+ { |
+ public: |
+ JsEngineNotAvailableException() |
+ : std::runtime_error("JsEngine is not available") |
+ { |
+ } |
+ }; |
+ |
+ /** |
* Creates a new JavaScript engine instance. |
* @param appInfo Information about the app. |
* @param isolate v8::Isolate wrapper. This parameter should be considered |