15 std::string &&message,
17 ) :
std::runtime_error(
"") {
41 std::ostringstream ss;
const std::string & get_message() const
Constructs the message string.
std::ostringstream message
The stringstream used to construct the message.
AnalysisError(std::string &&message="", const tree::Annotatable *node=nullptr)
Constructs a new error.
Toplevel namespace with entry points for the new API.
Source location annotation object, containing source file line numbers etc.
std::unique_ptr< annotations::SourceLocation > location
Attached location in the source file, if any.
Contains custom exception objects used by libqasm.
const char * what() const noexcept override
Returns the message exception-style.
void context(const tree::Annotatable &node)
Sets the context of this error to the SourceLocation annotation of the given node, if the error doesn't already have such a context.
::tree::annotatable::Annotatable Annotatable
annotations::SourceLocation SourceLocation