Left: | ||
Right: |
OLD | NEW |
---|---|
1 /* | 1 /* |
2 * This file is part of Adblock Plus <https://adblockplus.org/>, | 2 * This file is part of Adblock Plus <https://adblockplus.org/>, |
3 * Copyright (C) 2006-2015 Eyeo GmbH | 3 * Copyright (C) 2006-2015 Eyeo GmbH |
4 * | 4 * |
5 * Adblock Plus is free software: you can redistribute it and/or modify | 5 * Adblock Plus is free software: you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License version 3 as | 6 * it under the terms of the GNU General Public License version 3 as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
8 * | 8 * |
9 * Adblock Plus is distributed in the hope that it will be useful, | 9 * Adblock Plus is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 * GNU General Public License for more details. | 12 * GNU General Public License for more details. |
13 * | 13 * |
14 * You should have received a copy of the GNU General Public License | 14 * You should have received a copy of the GNU General Public License |
15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. | 15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. |
16 */ | 16 */ |
17 | 17 |
18 #ifndef _PLUGIN_DEBUG_H_ | 18 #ifndef _PLUGIN_DEBUG_H_ |
19 #define _PLUGIN_DEBUG_H_ | 19 #define _PLUGIN_DEBUG_H_ |
20 | 20 |
21 #define PLUGIN_ERROR_ENTRY_POINT 99 | |
22 #define PLUGIN_ERROR_ENTRY_POINT_CATCHALL_EXCEPTION 1 | |
Oleksandr
2015/03/05 07:18:55
Shouldn't this should be in PluginErrorCodes.h?
Eric
2015/03/05 14:58:04
Well, I would prefer to eliminate PluginErrorCodes
| |
23 | |
21 class CPluginDebug | 24 class CPluginDebug |
22 { | 25 { |
23 | 26 |
24 public: | 27 public: |
25 static void DebugSystemException(const std::system_error& ex, int errorId, int errorSubid, const std::string& description); | 28 static void DebugSystemException(const std::system_error& ex, int errorId, int errorSubid, const std::string& description); |
26 | 29 |
27 #if (defined ENABLE_DEBUG_INFO) | 30 #if (defined ENABLE_DEBUG_INFO) |
28 static void Debug(const std::string& text, DWORD processId=0, DWORD threadId=0 ); | 31 static void Debug(const std::string& text, DWORD processId=0, DWORD threadId=0 ); |
29 static void Debug(const std::wstring& text, DWORD processId=0, DWORD threadId= 0); | 32 static void Debug(const std::wstring& text, DWORD processId=0, DWORD threadId= 0); |
30 static void DebugException(const std::exception& ex); | 33 static void DebugException(const std::exception& ex); |
31 static void DebugErrorCode(DWORD errorCode, const std::string& error, DWORD pr ocessId=0, DWORD threadId=0); | 34 static void DebugErrorCode(DWORD errorCode, const std::string& error, DWORD pr ocessId=0, DWORD threadId=0); |
35 static void DebugOrdinaryException(const std::exception& ex, int errorId, int errorSubid, const std::string& description); | |
32 #endif | 36 #endif |
33 | 37 |
34 #if (defined ENABLE_DEBUG_RESULT) | 38 #if (defined ENABLE_DEBUG_RESULT) |
35 static void DebugResult(const std::wstring& text); | 39 static void DebugResult(const std::wstring& text); |
36 static void DebugResultDomain(const std::wstring& domain); | 40 static void DebugResultDomain(const std::wstring& domain); |
37 static void DebugResultBlocking(const std::wstring& type, const std::wstring& src, const std::wstring& domain); | 41 static void DebugResultBlocking(const std::wstring& type, const std::wstring& src, const std::wstring& domain); |
38 static void DebugResultHiding(const std::wstring& tag, const std::wstring& id, const std::wstring& filter); | 42 static void DebugResultHiding(const std::wstring& tag, const std::wstring& id, const std::wstring& filter); |
39 #endif | 43 #endif |
40 | 44 |
41 #if (defined ENABLE_DEBUG_RESULT_IGNORED) | 45 #if (defined ENABLE_DEBUG_RESULT_IGNORED) |
42 static void DebugResultIgnoring(const std::wstring& type, const std::wstring& src, const std::wstring& domain); | 46 static void DebugResultIgnoring(const std::wstring& type, const std::wstring& src, const std::wstring& domain); |
43 #endif | 47 #endif |
44 }; | 48 }; |
45 | 49 |
50 void EntryPointExceptionDefault(std::string name); | |
51 | |
46 | 52 |
47 #endif // _PLUGIN_DEBUG_H_ | 53 #endif // _PLUGIN_DEBUG_H_ |
OLD | NEW |