]> git.sesse.net Git - casparcg/commitdiff
2.0. Improved error messages for fatal initialization errors.
authorRonag <Ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Wed, 3 Aug 2011 21:02:06 +0000 (21:02 +0000)
committerRonag <Ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Wed, 3 Aug 2011 21:02:06 +0000 (21:02 +0000)
git-svn-id: https://casparcg.svn.sourceforge.net/svnroot/casparcg/server/branches/2.0.0.2@1049 362d55ac-95cf-4e76-9f9a-cbaa9c17b72d

shell/main.cpp

index e52ab6dbecbd65757276585ffabe27119b3824d7..78e82875f545438a57ad6e873cd784ce8657df4c 100644 (file)
@@ -51,6 +51,7 @@
 #include <common/exception/win32_exception.h>\r
 #include <common/exception/exceptions.h>\r
 #include <common/log/log.h>\r
+#include <common/gl/gl_check.h>\r
 #include <common/os/windows/current_version.h>\r
 #include <common/os/windows/system_info.h>\r
 #include <common/utility/assert.h>\r
@@ -59,6 +60,7 @@
 #include <tbb/task_scheduler_init.h>\r
 \r
 #include <boost/foreach.hpp>\r
+#include <boost/property_tree/detail/file_parser_error.hpp>\r
 \r
 // NOTE: This is needed in order to make CComObject work since this is not a real ATL project.\r
 CComModule _AtlModule;\r
@@ -252,10 +254,21 @@ int main(int argc, wchar_t* argv[])
                        amcp.Parse(wcmd.c_str(), wcmd.length(), dummy);\r
                }\r
        }\r
+       catch(boost::property_tree::file_parser_error&)\r
+       {\r
+               CASPAR_LOG_CURRENT_EXCEPTION();\r
+               CASPAR_LOG(fatal) << L"Unhandled configuration error in main thread. Please check the configuration file (casparcg.config) for errors.";\r
+       }\r
+       catch(caspar::gl::ogl_exception&)\r
+       {\r
+               CASPAR_LOG_CURRENT_EXCEPTION();\r
+\r
+               CASPAR_LOG(fatal) << L"Unhandled OpenGL Error in main thread. Please try to update graphics drivers in order to receive full OpenGL 3.1+ Support.";\r
+       }\r
        catch(...)\r
        {\r
-               CASPAR_LOG(fatal) << "UNHANDLED EXCEPTION in main thread.";\r
                CASPAR_LOG_CURRENT_EXCEPTION();\r
+               CASPAR_LOG(fatal) << L"Unhandled exception in main thread. Please report this error on the CasparCG forums (www.casparcg.com/forum).";\r
        }       \r
        \r
        CASPAR_LOG(info) << "Successfully shutdown CasparCG Server.";\r