diff --git a/antigo/src/antigo/impl/OnstackContextImpl.h b/antigo/src/antigo/impl/OnstackContextImpl.h index 6708ce31ba..13c042a82d 100644 --- a/antigo/src/antigo/impl/OnstackContextImpl.h +++ b/antigo/src/antigo/impl/OnstackContextImpl.h @@ -12,6 +12,7 @@ #include #include +#include #include "antigo/impl/complex_values.h" #include "antigo/ResolvedContext.h" @@ -80,11 +81,12 @@ struct OnstackDataFrame { }; ResolvedMessageEntry Resolve() const { - try { + CPPTRACE_TRY { return std::visit(ToPreparedVisitor{}, value); - } catch (const std::exception& e) { - return {"error", "ctx: error while resolving value, variant index " + std::to_string(value.index())}; + } CPPTRACE_CATCH (const std::exception& e) { + return {"error", "ctx: error while resolving value, variant index " + std::to_string(value.index()) + "\nwhat: " + e.what() + '\n' + cpptrace::from_current_exception().to_string()}; } + return {"error", "resolve error: this code should be unreachable?"}; } }; static_assert(sizeof(OnstackDataFrame) == 16);