CMake option to disable Exceptions by Macintron · Pull Request #1342 · webview/webview
Some projects don't allow exceptions. Add a CMake Option WEBVIEW_HAS_NO_EXCEPTIONS to disable exceptions.
I know,WEBVIEW_HAS_NO_EXCEPTIONS is a name with a negative wording. An alternative name could be WEBVIEW_EXCEPTIONS_DISABLED.
In case an exception occurs, the macro WEBVIEW_THROW_REPLACEMENT is invoked. By default, std::terminate() is called. The user can define it's own handling.
Because the unit tests are heavily based on exceptions, they are disabled if -DWEBVIEW_HAS_NO_EXCEPTIONS=ON is used.