![]() |
Shamrock 2025.10.0
Astrophysical Code
|
Provides utilities for adding context to exceptions. More...
#include "shambase/SourceLocation.hpp"#include "shambase/exception.hpp"#include "shambase/string.hpp"#include <string>#include <vector>
Include dependency graph for exception_ctx.hpp:Go to the source code of this file.
Classes | |
| struct | shambase::args_info |
| An argument containing a name and a value. More... | |
| struct | shambase::arg_group |
| A context group containing a section name and a list of arguments. More... | |
| struct | shambase::context |
| A context containing a list of argument groups. More... | |
Namespaces | |
| namespace | shambase |
| namespace for basic c++ utilities | |
Macros | |
| #define | ARG_INFO(var) shambase::args_info(#var, var) |
| Macro to automatically capture variable name and value for exception context. | |
Functions | |
| template<class exception_type > | |
| exception_type | shambase::make_except_with_loc_with_ctx (std::string message, context ctx, SourceLocation loc=SourceLocation{}) |
| Make an exception with a message and variadic context groups. | |
Provides utilities for adding context to exceptions.
Definition in file exception_ctx.hpp.
| #define ARG_INFO | ( | var | ) | shambase::args_info(#var, var) |
Macro to automatically capture variable name and value for exception context.
This macro stringifies the variable name and passes both the name and value to create an args_info object.
Example:
Definition at line 138 of file exception_ctx.hpp.