scenario_simulator_v2 C++ API
Namespaces | Macros
error.hpp File Reference
#include <exception>
#include <iomanip>
#include <openscenario_interpreter/utility/demangle.hpp>
#include <scenario_simulator_exception/exception.hpp>
#include <stdexcept>
Include dependency graph for error.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 openscenario_interpreter
 

Macros

#define LINE()    std::cout << "\x1b[33m" __FILE__ "\x1b[31m:\x1b[36m" << __LINE__ << "\x1b[0m" << std::endl
 
#define PRINT(...)   std::cout << #__VA_ARGS__ " = " << std::boolalpha << (__VA_ARGS__) << std::endl
 
#define INVALID_NUMERIC_LITERAL_SPECIFIED(VALUE)
 
#define UNSUPPORTED_ENUMERATION_VALUE_SPECIFIED(TYPE, VALUE)
 
#define UNEXPECTED_ENUMERATION_VALUE_SPECIFIED(TYPE, VALUE)    SyntaxError("Unexpected value ", std::quoted(VALUE), " of type " #TYPE " was specified")
 
#define UNEXPECTED_ENUMERATION_VALUE_ASSIGNED(TYPE, VALUE)
 
#define UNSUPPORTED_ELEMENT_SPECIFIED(ELEMENT)
 
#define UNSUPPORTED_CONVERSION_DETECTED(FROM, TO)
 
#define UNSUPPORTED_SETTING_DETECTED(ACTION_OR_CONDITION, ELEMENT)    SyntaxError(#ACTION_OR_CONDITION " does not yet support ", ELEMENT)
 

Macro Definition Documentation

◆ INVALID_NUMERIC_LITERAL_SPECIFIED

#define INVALID_NUMERIC_LITERAL_SPECIFIED (   VALUE)
Value:
SyntaxError( \
"Given value ", std::quoted(VALUE), " is not an external representation of type ", \
demangle(typeid(*this)))
auto demangle(const char *name) -> std::string
Definition: demangle.cpp:26

◆ LINE

#define LINE ( )     std::cout << "\x1b[33m" __FILE__ "\x1b[31m:\x1b[36m" << __LINE__ << "\x1b[0m" << std::endl

◆ PRINT

#define PRINT (   ...)    std::cout << #__VA_ARGS__ " = " << std::boolalpha << (__VA_ARGS__) << std::endl

◆ UNEXPECTED_ENUMERATION_VALUE_ASSIGNED

#define UNEXPECTED_ENUMERATION_VALUE_ASSIGNED (   TYPE,
  VALUE 
)
Value:
SyntaxError( \
"Unexpected value ", static_cast<TYPE::value_type>(VALUE), " was assigned to type " #TYPE)

◆ UNEXPECTED_ENUMERATION_VALUE_SPECIFIED

#define UNEXPECTED_ENUMERATION_VALUE_SPECIFIED (   TYPE,
  VALUE 
)     SyntaxError("Unexpected value ", std::quoted(VALUE), " of type " #TYPE " was specified")

◆ UNSUPPORTED_CONVERSION_DETECTED

#define UNSUPPORTED_CONVERSION_DETECTED (   FROM,
  TO 
)
Value:
SyntaxError("Converting " #FROM " to " #TO \
". This is valid in OpenSCENARIO standard, but is not yet supported")

◆ UNSUPPORTED_ELEMENT_SPECIFIED

#define UNSUPPORTED_ELEMENT_SPECIFIED (   ELEMENT)
Value:
SyntaxError( \
"Given class ", ELEMENT, " is valid OpenSCENARIO element of class ", demangle(typeid(*this)), \
", but is not supported yet")
#define ELEMENT(TYPE)
Definition: catalog_locations.cpp:24

◆ UNSUPPORTED_ENUMERATION_VALUE_SPECIFIED

#define UNSUPPORTED_ENUMERATION_VALUE_SPECIFIED (   TYPE,
  VALUE 
)
Value:
SyntaxError( \
"Given value ", std::quoted(VALUE), \
" is valid OpenSCENARIO value of type " #TYPE ", but it is not supported yet")

◆ UNSUPPORTED_SETTING_DETECTED

#define UNSUPPORTED_SETTING_DETECTED (   ACTION_OR_CONDITION,
  ELEMENT 
)     SyntaxError(#ACTION_OR_CONDITION " does not yet support ", ELEMENT)