]> git.sesse.net Git - casparcg/blobdiff - common/except.cpp
set svn:eol-style native on .h and .cpp files
[casparcg] / common / except.cpp
index 82bdf638fba4cc8d0bd7dade5b285ccf45b6e43b..86cb8cb6e3877d3dd6095321ee8f23f8500abdf3 100644 (file)
@@ -1,55 +1,55 @@
-#include "stdafx.h"\r
-\r
-#include "except.h"\r
-\r
-#include "os/windows/windows.h"\r
-\r
-namespace caspar {\r
-       \r
-void win32_exception::install_handler() \r
-{\r
-//#ifndef _DEBUG\r
-       _set_se_translator(win32_exception::Handler);\r
-//#endif\r
-}\r
-\r
-void win32_exception::Handler(unsigned int errorCode, EXCEPTION_POINTERS* pInfo) {\r
-       switch(errorCode)\r
-       {\r
-       case EXCEPTION_ACCESS_VIOLATION:\r
-               throw win32_access_violation(*(pInfo->ExceptionRecord));\r
-               break;\r
-\r
-       default:\r
-               throw win32_exception(*(pInfo->ExceptionRecord));\r
-       }\r
-}\r
-\r
-win32_exception::win32_exception(const EXCEPTION_RECORD& info) : message_("Win32 exception"), location_(info.ExceptionAddress), errorCode_(info.ExceptionCode)\r
-{\r
-       switch(info.ExceptionCode)\r
-       {\r
-       case EXCEPTION_ACCESS_VIOLATION:\r
-               message_ = "Access violation";\r
-               break;\r
-       case EXCEPTION_FLT_DIVIDE_BY_ZERO:\r
-       case EXCEPTION_INT_DIVIDE_BY_ZERO:\r
-               message_ = "Divide by zero";\r
-               break;\r
-       }\r
-}\r
-\r
-win32_access_violation::win32_access_violation(const EXCEPTION_RECORD& info) : win32_exception(info), isWrite_(false), badAddress_(0) \r
-{\r
-       isWrite_ = info.ExceptionInformation[0] == 1;\r
-       badAddress_ = reinterpret_cast<win32_exception::address>(info.ExceptionInformation[1]);\r
-}\r
-\r
-const char* win32_access_violation::what() const\r
-{\r
-       sprintf_s<>(messageBuffer_, "Access violation at %p, trying to %s %p", location(), isWrite_?"write":"read", badAddress_);\r
-\r
-       return messageBuffer_;\r
-}\r
-\r
+#include "stdafx.h"
+
+#include "except.h"
+
+#include "os/windows/windows.h"
+
+namespace caspar {
+       
+void win32_exception::install_handler() 
+{
+//#ifndef _DEBUG
+       _set_se_translator(win32_exception::Handler);
+//#endif
+}
+
+void win32_exception::Handler(unsigned int errorCode, EXCEPTION_POINTERS* pInfo) {
+       switch(errorCode)
+       {
+       case EXCEPTION_ACCESS_VIOLATION:
+               throw win32_access_violation(*(pInfo->ExceptionRecord));
+               break;
+
+       default:
+               throw win32_exception(*(pInfo->ExceptionRecord));
+       }
+}
+
+win32_exception::win32_exception(const EXCEPTION_RECORD& info) : message_("Win32 exception"), location_(info.ExceptionAddress), errorCode_(info.ExceptionCode)
+{
+       switch(info.ExceptionCode)
+       {
+       case EXCEPTION_ACCESS_VIOLATION:
+               message_ = "Access violation";
+               break;
+       case EXCEPTION_FLT_DIVIDE_BY_ZERO:
+       case EXCEPTION_INT_DIVIDE_BY_ZERO:
+               message_ = "Divide by zero";
+               break;
+       }
+}
+
+win32_access_violation::win32_access_violation(const EXCEPTION_RECORD& info) : win32_exception(info), isWrite_(false), badAddress_(0) 
+{
+       isWrite_ = info.ExceptionInformation[0] == 1;
+       badAddress_ = reinterpret_cast<win32_exception::address>(info.ExceptionInformation[1]);
+}
+
+const char* win32_access_violation::what() const
+{
+       sprintf_s<>(messageBuffer_, "Access violation at %p, trying to %s %p", location(), isWrite_?"write":"read", badAddress_);
+
+       return messageBuffer_;
+}
+
 }
\ No newline at end of file