- try
- {
- CASPAR_LOG(fatal) << L"#######################\n UNHANDLED EXCEPTION: \n"
- << L"Adress:" << info->ExceptionRecord->ExceptionAddress << L"\n"
- << L"Code:" << info->ExceptionRecord->ExceptionCode << L"\n"
- << L"Flag:" << info->ExceptionRecord->ExceptionFlags << L"\n"
- << L"Info:" << info->ExceptionRecord->ExceptionInformation << L"\n"
- << L"Continuing execution. \n#######################";
-
- CASPAR_LOG_CALL_STACK();
- }
- catch(...){}
-
- return EXCEPTION_CONTINUE_EXECUTION;
-}
-
-void do_run(server& caspar_server, std::promise<bool>& shutdown_server_now)
-{
- // Create a dummy client which prints amcp responses to console.
- auto console_client = spl::make_shared<IO::ConsoleClientInfo>();
-
- // Create a amcp parser for console commands.
- auto amcp = spl::make_shared<caspar::IO::delimiter_based_chunking_strategy_factory<wchar_t>>(
- L"\r\n",
- spl::make_shared<caspar::IO::legacy_strategy_adapter_factory>(
- spl::make_shared<protocol::amcp::AMCPProtocolStrategy>(
- caspar_server.channels(),
- caspar_server.get_thumbnail_generator(),
- caspar_server.get_media_info_repo(),
- caspar_server.get_system_info_provider_repo(),
- caspar_server.get_cg_registry(),
- shutdown_server_now)))->create(console_client);
-