Spicy
Public Member Functions | Protected Types | Protected Member Functions | List of all members
hilti::rt::Exception Class Reference

#include <exception.h>

Inheritance diagram for hilti::rt::Exception:

Public Member Functions

 Exception (std::string_view desc)
 
 Exception (std::string_view desc, std::string_view location)
 
 Exception (const Exception &other)
 
 Exception (Exception &&) noexcept=default
 
Exceptionoperator= (const Exception &other)=default
 
Exceptionoperator= (Exception &&) noexcept=default
 
const auto & description () const
 
const auto & location () const
 
const Backtracebacktrace () const
 

Protected Types

enum  Internal
 

Protected Member Functions

 Exception (Internal, const char *type, std::string_view desc)
 
 Exception (Internal, const char *type, std::string_view desc, std::string_view location)
 

Detailed Description

HILTI's base exception type. All HILTI-side runtime exceptions are derived from this. Instantiate specialized derived classes, not the base class.

Constructor & Destructor Documentation

◆ Exception() [1/2]

hilti::rt::Exception::Exception ( std::string_view  desc)
inline
Parameters
descmessage describing the situation

◆ Exception() [2/2]

hilti::rt::Exception::Exception ( std::string_view  desc,
std::string_view  location 
)
inline
Parameters
descmessage describing the situation
locationstring indicating the location of the operation that failed

Member Function Documentation

◆ backtrace()

const Backtrace* hilti::rt::Exception::backtrace ( ) const
inline

Returns a stack backtrace captured at the time the exception was thrown, if available. Returns null if unavailable.

◆ description()

const auto& hilti::rt::Exception::description ( ) const
inline

Returns the message associated with the exception.

◆ location()

const auto& hilti::rt::Exception::location ( ) const
inline

Returns the location associated with the exception.


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