| 15 | namespace cmDebugger { |
| 16 | |
| 17 | cmDebuggerExceptionManager::cmDebuggerExceptionManager( |
| 18 | dap::Session* dapSession) |
| 19 | : DapSession(dapSession) |
| 20 | { |
| 21 | // https://microsoft.github.io/debug-adapter-protocol/specification#Requests_SetExceptionBreakpoints |
| 22 | DapSession->registerHandler( |
| 23 | [&](dap::SetExceptionBreakpointsRequest const& request) { |
| 24 | return HandleSetExceptionBreakpointsRequest(request); |
| 25 | }); |
| 26 | |
| 27 | // https://microsoft.github.io/debug-adapter-protocol/specification#Requests_ExceptionInfo |
| 28 | DapSession->registerHandler([&](dap::ExceptionInfoRequest /*unused*/) { |
| 29 | return HandleExceptionInfoRequest(); |
| 30 | }); |
| 31 | |
| 32 | ExceptionMap[MessageType::AUTHOR_WARNING] = |
| 33 | cmDebuggerExceptionFilter{ "AUTHOR_WARNING", "Warning (dev)" }; |
| 34 | ExceptionMap[MessageType::AUTHOR_ERROR] = |
| 35 | cmDebuggerExceptionFilter{ "AUTHOR_ERROR", "Error (dev)" }; |
| 36 | ExceptionMap[MessageType::FATAL_ERROR] = |
| 37 | cmDebuggerExceptionFilter{ "FATAL_ERROR", "Fatal error" }; |
| 38 | ExceptionMap[MessageType::INTERNAL_ERROR] = |
| 39 | cmDebuggerExceptionFilter{ "INTERNAL_ERROR", "Internal error" }; |
| 40 | ExceptionMap[MessageType::MESSAGE] = |
| 41 | cmDebuggerExceptionFilter{ "MESSAGE", "Other messages" }; |
| 42 | ExceptionMap[MessageType::WARNING] = |
| 43 | cmDebuggerExceptionFilter{ "WARNING", "Warning" }; |
| 44 | ExceptionMap[MessageType::LOG] = |
| 45 | cmDebuggerExceptionFilter{ "LOG", "Debug log" }; |
| 46 | ExceptionMap[MessageType::DEPRECATION_ERROR] = |
| 47 | cmDebuggerExceptionFilter{ "DEPRECATION_ERROR", "Deprecation error" }; |
| 48 | ExceptionMap[MessageType::DEPRECATION_WARNING] = |
| 49 | cmDebuggerExceptionFilter{ "DEPRECATION_WARNING", "Deprecation warning" }; |
| 50 | RaiseExceptions["AUTHOR_ERROR"] = true; |
| 51 | RaiseExceptions["FATAL_ERROR"] = true; |
| 52 | RaiseExceptions["INTERNAL_ERROR"] = true; |
| 53 | RaiseExceptions["DEPRECATION_ERROR"] = true; |
| 54 | } |
| 55 | |
| 56 | dap::SetExceptionBreakpointsResponse |
| 57 | cmDebuggerExceptionManager::HandleSetExceptionBreakpointsRequest( |
nothing calls this directly
no test coverage detected