| Left: | ||
| Right: |
| LEFT | RIGHT |
|---|---|
| 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 | |
| 21 // Plugin errors | |
| 22 | |
| 23 #define PLUGIN_ERROR_SESSION 3 | |
| 24 #define PLUGIN_ERROR_SESSION_GET_INTERNET_SESSION 1 | |
| 25 #define PLUGIN_ERROR_SESSION_CREATE_HTTP_INSTANCE 2 | |
| 26 #define PLUGIN_ERROR_SESSION_REGISTER_HTTP_NAMESPACE 3 | |
| 27 #define PLUGIN_ERROR_SESSION_CREATE_HTTPS_INSTANCE 4 | |
| 28 #define PLUGIN_ERROR_SESSION_REGISTER_HTTPS_NAMESPACE 5 | |
| 29 | |
| 30 #define PLUGIN_ERROR_THREAD 5 | |
| 31 #define PLUGIN_ERROR_MAIN_THREAD_CREATE_PROCESS 1 | |
| 32 #define PLUGIN_ERROR_TAB_THREAD_CREATE_PROCESS 2 | |
| 33 | |
| 34 #define PLUGIN_ERROR_SYSINFO 7 | |
| 35 #define PLUGIN_ERROR_SYSINFO_BROWSER_LANGUAGE 3 | |
| 36 | |
| 37 #define PLUGIN_ERROR_NAVIGATION 10 | |
| 38 #define PLUGIN_ERROR_NAVIGATION_WELCOME 1 | |
| 39 #define PLUGIN_ERROR_NAVIGATION_SETTINGS 7 | |
| 40 | |
| 41 #define PLUGIN_ERROR_MUTEX 13 | |
| 42 #define PLUGIN_ERROR_MUTEX_CREATE 1 | |
| 43 #define PLUGIN_ERROR_MUTEX_RELEASE 2 | |
| 44 #define PLUGIN_ERROR_MUTEX_WAIT 3 | |
| 45 #define PLUGIN_ERROR_MUTEX_WAIT_TIMEOUT 4 | |
| 46 #define PLUGIN_ERROR_MUTEX_DEBUG_FILE 50 | |
| 47 #define PLUGIN_ERROR_MUTEX_SETTINGS_FILE_WHITELIST 90 | |
| 48 | |
| 49 #define PLUGIN_ERROR_SET_SITE 16 | |
| 50 #define PLUGIN_ERROR_SET_SITE_ADVICE 1 | |
| 51 #define PLUGIN_ERROR_SET_SITE_UNADVISE 2 | |
| 52 #define PLUGIN_ERROR_SET_SITE_QUERY_BROWSER 3 | |
| 53 #define PLUGIN_ERROR_SET_SITE_QUERY_SERVICE_PROVIDER 4 | |
| 54 #define PLUGIN_ERROR_SET_SITE_COINIT 5 | |
| 55 #define PLUGIN_ERROR_SET_SITE_FIND_CONNECTION_POINT 6 | |
| 56 | |
| 57 #define PLUGIN_ERROR_UI 17 | |
| 58 #define PLUGIN_ERROR_UI_GET_UXTHEME 1 | |
| 59 #define PLUGIN_ERROR_UI_GET_UXTHEME_OPEN 2 | |
| 60 #define PLUGIN_ERROR_UI_GET_UXTHEME_DRAW_BACKGROUND 3 | |
| 61 #define PLUGIN_ERROR_UI_GET_UXTHEME_CLOSE 4 | |
| 62 #define PLUGIN_ERROR_UI_GET_BROWSER_WINDOW 5 | |
| 63 #define PLUGIN_ERROR_UI_CREATE_STATUSBAR_PANE 6 | |
| 64 #define PLUGIN_ERROR_UI_REGISTER_PANE_CLASS 7 | |
| 65 #define PLUGIN_ERROR_UI_NO_STATUSBAR_BROWSER 8 | |
| 66 #define PLUGIN_ERROR_UI_LOAD_ICON 9 | |
| 67 #define PLUGIN_ERROR_UI_NO_STATUSBAR_WIN 10 | |
| 68 #define PLUGIN_ERROR_UI_INVALIDATE_STATUSBAR 11 | |
| 69 #define PLUGIN_ERROR_UI_GET_STATUSBAR 12 | |
| 70 #define PLUGIN_ERROR_UI_PUT_STATUSBAR 13 | |
| 71 | |
| 72 #define PLUGIN_ERROR_CREATE_SETTINGS_JAVASCRIPT 25 | |
| 73 #define PLUGIN_ERROR_CREATE_SETTINGS_JAVASCRIPT_INVOKE 1 | |
| 20 | 74 |
| 21 #define PLUGIN_ERROR_ENTRY_POINT 99 | 75 #define PLUGIN_ERROR_ENTRY_POINT 99 |
| 22 #define PLUGIN_ERROR_ENTRY_POINT_CATCHALL_EXCEPTION 1 | 76 #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 | 77 |
| 24 class CPluginDebug | 78 class CPluginDebug |
| 25 { | 79 { |
| 26 | 80 |
| 27 public: | 81 public: |
| 28 static void DebugSystemException(const std::system_error& ex, int errorId, int errorSubid, const std::string& description); | 82 static void DebugSystemException(const std::system_error& ex, int errorId, int errorSubid, const std::string& description); |
| 29 | 83 |
| 30 #if (defined ENABLE_DEBUG_INFO) | 84 #if (defined ENABLE_DEBUG_INFO) |
| 31 static void Debug(const std::string& text, DWORD processId=0, DWORD threadId=0 ); | 85 static void Debug(const std::string& text, DWORD processId=0, DWORD threadId=0 ); |
| 32 static void Debug(const std::wstring& text, DWORD processId=0, DWORD threadId= 0); | 86 static void Debug(const std::wstring& text, DWORD processId=0, DWORD threadId= 0); |
| 33 static void DebugException(const std::exception& ex); | 87 static void DebugException(const std::exception& ex); |
| 34 static void DebugErrorCode(DWORD errorCode, const std::string& error, DWORD pr ocessId=0, DWORD threadId=0); | 88 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); | 89 static void DebugOrdinaryException(const std::exception& ex, int errorId, int errorSubid, const std::string& description); |
| 36 #endif | 90 #endif |
| 37 | 91 |
| 38 #if (defined ENABLE_DEBUG_RESULT) | 92 #if (defined ENABLE_DEBUG_RESULT) |
| 39 static void DebugResult(const std::wstring& text); | 93 static void DebugResult(const std::wstring& text); |
| 40 static void DebugResultDomain(const std::wstring& domain); | 94 static void DebugResultDomain(const std::wstring& domain); |
| 41 static void DebugResultBlocking(const std::wstring& type, const std::wstring& src, const std::wstring& domain); | 95 static void DebugResultBlocking(const std::wstring& type, const std::wstring& src, const std::wstring& domain); |
| 42 static void DebugResultHiding(const std::wstring& tag, const std::wstring& id, const std::wstring& filter); | 96 static void DebugResultHiding(const std::wstring& tag, const std::wstring& id, const std::wstring& filter); |
| 43 #endif | 97 #endif |
| 44 | 98 |
| 45 #if (defined ENABLE_DEBUG_RESULT_IGNORED) | 99 #if (defined ENABLE_DEBUG_RESULT_IGNORED) |
| 46 static void DebugResultIgnoring(const std::wstring& type, const std::wstring& src, const std::wstring& domain); | 100 static void DebugResultIgnoring(const std::wstring& type, const std::wstring& src, const std::wstring& domain); |
| 47 #endif | 101 #endif |
| 48 }; | 102 }; |
| 49 | 103 |
| 50 void EntryPointExceptionDefault(std::string name); | 104 void ExceptionDefault(const std::string& name);» |
| 51 | 105 void EntryPointExceptionDefault(const std::string& name); |
| 52 | 106 |
| 53 #endif // _PLUGIN_DEBUG_H_ | 107 #endif // _PLUGIN_DEBUG_H_ |
| LEFT | RIGHT |