Elementa v8.0.0
Minimalistic library for any C++ application (C++11 and up)
Loading...
Searching...
No Matches
elementa::parsing::Expression::MisusedElement Class Reference

Error: element used badly in expression. More...

Description

Error: element used badly in expression.

Definition at line 495 of file expressions.h.

#include "expressions.h"

Inheritance diagram for elementa::parsing::Expression::MisusedElement:
Collaboration diagram for elementa::parsing::Expression::MisusedElement:

Public Types

Types, consts., etc.
using StdBase = std::runtime_error
 

Public Member Functions

 MisusedElement (const std::string &details)
 
Launching methods
virtual ExcasERR (const std::string &context) noexcept
 Transform it to be thrown as ERR with the given context. More...
 
virtual ExcasEXC (const std::string &place, const RTTextWithEnum::Combination &flags={RTTextWith::kAll_}) noexcept
 Transform it to be thrown as EXC with the given place and flags. More...
 
Catching methods
const char * what (void) const noexcept override
 Return the complete message. It will live as long as this exception. More...
 
const char * explanation (void) const noexcept
 Return the explanation only. It will live as long as this exception. More...
 
const char * context (void) const noexcept
 Return the place (EXC) or context (ERR) only. Will live as long as this. More...
 

Member Typedef Documentation

◆ StdBase

using elementa::base::Exc::StdBase = std::runtime_error
inherited

Definition at line 119 of file exceptions.h.

Constructor & Destructor Documentation

◆ MisusedElement()

elementa::parsing::Expression::MisusedElement::MisusedElement ( const std::string &  details)
inline

Definition at line 499 of file expressions.h.

Member Function Documentation

◆ asERR()

virtual Exc & elementa::base::Exc::asERR ( const std::string &  context)
virtualnoexceptinherited

◆ asEXC()

virtual Exc & elementa::base::Exc::asEXC ( const std::string &  place,
const RTTextWithEnum::Combination &  flags = {RTTextWith::kAll_} 
)
virtualnoexceptinherited

Transform it to be thrown as EXC with the given place and flags.

The flags are explained in debugging.h, runtime_src_place() function.

Referenced by elementa::base::Szer_Char::deser(), and elementa::base::Szer_NatBin< NatType >::deser().

◆ what()

const char * elementa::base::Exc::what ( void  ) const
inlineoverridenoexceptinherited

Return the complete message. It will live as long as this exception.

The message will be one-line except if the explanation or place/context contain some CR.

Definition at line 161 of file exceptions.h.

◆ explanation()

const char * elementa::base::Exc::explanation ( void  ) const
inlinenoexceptinherited

Return the explanation only. It will live as long as this exception.

Definition at line 164 of file exceptions.h.

◆ context()

const char * elementa::base::Exc::context ( void  ) const
inlinenoexceptinherited

Return the place (EXC) or context (ERR) only. Will live as long as this.

Definition at line 167 of file exceptions.h.


The documentation for this class was generated from the following file: