irccd  3.0.3
Public Member Functions | List of all members
irccd::js::duk::stack_info Class Reference

Error description. More...

#include <duk.hpp>

Inheritance diagram for irccd::js::duk::stack_info:

Public Member Functions

 stack_info (std::string name, std::string message, std::string stack, std::string file_name, unsigned line_number=0) noexcept
 
auto get_name () const noexcept -> const std::string &
 
auto get_message () const noexcept -> const std::string &
 
auto get_stack () const noexcept -> const std::string &
 
auto get_file_name () const noexcept -> const std::string &
 
auto get_line_number () const noexcept -> unsigned
 
auto what () const noexcept -> const char *override
 

Detailed Description

Error description.

This class fills the fields got in an Error object.

Constructor & Destructor Documentation

◆ stack_info()

irccd::js::duk::stack_info::stack_info ( std::string  name,
std::string  message,
std::string  stack,
std::string  file_name,
unsigned  line_number = 0 
)
noexcept

Construct the stack information.

Parameters
namethe exception name (e.g. ReferenceError)
messagethe error message
stackthe stack trace
file_namethe optional filename
line_numberthe optional line number

Member Function Documentation

◆ get_file_name()

auto irccd::js::duk::stack_info::get_file_name ( ) const -> const std::string &
noexcept

Get the optional file name.

Returns
the file name

◆ get_line_number()

auto irccd::js::duk::stack_info::get_line_number ( ) const -> unsigned
noexcept

Get the line number.

Returns
the line number

◆ get_message()

auto irccd::js::duk::stack_info::get_message ( ) const -> const std::string &
noexcept

Get the error message.

Returns
the message

◆ get_name()

auto irccd::js::duk::stack_info::get_name ( ) const -> const std::string &
noexcept

Get the exception name.

Returns
the exception name (e.g. ReferenceError)

◆ get_stack()

auto irccd::js::duk::stack_info::get_stack ( ) const -> const std::string &
noexcept

Get the stack trace.

Returns
the stack

◆ what()

auto irccd::js::duk::stack_info::what ( ) const -> const char *override
overridenoexcept

Get the error message. This effectively returns message field.

Returns
the message

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