OSDN Git Service

Enable IBugTraqProvide CheckCommit and OnCommitFinished
[tortoisegit/TortoiseGitJp.git] / src / Utils / COMError.h
diff --git a/src/Utils/COMError.h b/src/Utils/COMError.h
new file mode 100644 (file)
index 0000000..8041233
--- /dev/null
@@ -0,0 +1,38 @@
+// TortoiseSVN - a Windows shell extension for easy version control\r
+\r
+// Copyright (C) 2009 - TortoiseSVN\r
+\r
+// This program is free software; you can redistribute it and/or\r
+// modify it under the terms of the GNU General Public License\r
+// as published by the Free Software Foundation; either version 2\r
+// of the License, or (at your option) any later version.\r
+\r
+// This program is distributed in the hope that it will be useful,\r
+// but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
+// GNU General Public License for more details.\r
+\r
+// You should have received a copy of the GNU General Public License\r
+// along with this program; if not, write to the Free Software Foundation,\r
+// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\r
+//\r
+#pragma once\r
+\r
+class COMError\r
+{\r
+public:\r
+       COMError(HRESULT hr);\r
+       virtual ~COMError();\r
+\r
+       std::wstring GetMessage() {return message;}\r
+       std::wstring GetDescription() {return description;}\r
+       std::wstring GetMessageAndDescription() {return message + _T("\n") + description;}\r
+       std::wstring GetSource() {return source;}\r
+       std::wstring GetUUID() {return uuid;}\r
+\r
+private:\r
+       std::wstring message;\r
+       std::wstring description;\r
+       std::wstring source;\r
+       std::wstring uuid;\r
+};\r