diff options
| author | Dan Engelbrecht <[email protected]> | 2024-04-04 14:32:40 +0200 |
|---|---|---|
| committer | GitHub Enterprise <[email protected]> | 2024-04-04 14:32:40 +0200 |
| commit | 12b7bf1c16f671c83840961c37a339141a7ffbb3 (patch) | |
| tree | 3c503e6e1cd4d53b87c1baebcf9286ca8b72db06 /src/zenhttp/transports | |
| parent | hardening parsepackagemessage (#38) (diff) | |
| download | zen-12b7bf1c16f671c83840961c37a339141a7ffbb3.tar.xz zen-12b7bf1c16f671c83840961c37a339141a7ffbb3.zip | |
improved assert (#37)
- Improvement: Add file and line to ASSERT exceptions
- Improvement: Catch call stack when throwing assert exceptions and log/output call stack at important places to provide more context to caller
Diffstat (limited to 'src/zenhttp/transports')
| -rw-r--r-- | src/zenhttp/transports/asiotransport.cpp | 2 | ||||
| -rw-r--r-- | src/zenhttp/transports/winsocktransport.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/zenhttp/transports/asiotransport.cpp b/src/zenhttp/transports/asiotransport.cpp index a9a782821..96a15518c 100644 --- a/src/zenhttp/transports/asiotransport.cpp +++ b/src/zenhttp/transports/asiotransport.cpp @@ -426,7 +426,7 @@ AsioTransportPlugin::Initialize(TransportServer* ServerInterface) { m_IoService.run(); } - catch (std::exception& e) + catch (const std::exception& e) { ZEN_ERROR("exception caught in asio event loop: {}", e.what()); } diff --git a/src/zenhttp/transports/winsocktransport.cpp b/src/zenhttp/transports/winsocktransport.cpp index 7407c55dd..8c82760bb 100644 --- a/src/zenhttp/transports/winsocktransport.cpp +++ b/src/zenhttp/transports/winsocktransport.cpp @@ -309,7 +309,7 @@ SocketTransportPluginImpl::Initialize(TransportServer* ServerInterface) { Connection->HandleConnection(); } - catch (std::exception& Ex) + catch (const std::exception& Ex) { ZEN_WARN("exception caught in connection loop: {}", Ex.what()); } |