-
Notifications
You must be signed in to change notification settings - Fork 8.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow exceptions from ITerminalApi and TerminalDispatch (#12432)
This PR updates the `ITerminalApi` and `TerminalDispatch` classes to allow exceptions to be thrown in case of errors instead of using boolean return values. ## References This brings the Terminal code into alignment with the `AdaptDispatch` and `ConGetSet` changes made in PR #12247. And while this isn't exactly a fix for #12378, it does at least stop the app from crashing now. ## Detailed Description of the Pull Request / Additional comments All the `TerminalDispatch` methods have had their `noexcept` specifiers dropped, and any `try`/`catch` wrapping removed, so exceptions will now fall through to the `StateMachine` class where they should be safely caught and logged. The same goes for the `ITerminalApi` interface and its implementation in the `Terminal` class. And many of the methods in this interface have also had their `bool` return values changed to `void`, since there is usually not a need for error return values now. ## Validation Steps Performed I've manually tested the `OSC 9;9` sequence described in #12378 and confirmed that it no longer crashes. (cherry picked from commit 9c11e02)
- Loading branch information
Showing
8 changed files
with
437 additions
and
525 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.