| 101 | } |
| 102 | |
| 103 | cm::optional<dap::StoppedEvent> |
| 104 | cmDebuggerExceptionManager::RaiseExceptionIfAny(MessageType t, |
| 105 | std::string const& text) |
| 106 | { |
| 107 | cm::optional<dap::StoppedEvent> maybeStoppedEvent; |
| 108 | std::unique_lock<std::mutex> lock(Mutex); |
| 109 | if (RaiseExceptions[ExceptionMap[t].Filter]) { |
| 110 | dap::StoppedEvent stoppedEvent; |
| 111 | stoppedEvent.allThreadsStopped = true; |
| 112 | stoppedEvent.reason = "exception"; |
| 113 | stoppedEvent.description = "Pause on exception"; |
| 114 | stoppedEvent.text = text; |
| 115 | TheException = cmDebuggerException{ ExceptionMap[t].Filter, text }; |
| 116 | maybeStoppedEvent = std::move(stoppedEvent); |
| 117 | } |
| 118 | |
| 119 | return maybeStoppedEvent; |
| 120 | } |
| 121 | |
| 122 | void cmDebuggerExceptionManager::ClearAll() |
| 123 | { |