Represents an error that occurred during script compilation or execution.
More...
#include <error.hpp>
|
| | Error (const char *error_message, const Span *span) |
| const std::string & | errorMessage () const |
| | Gets the error message.
|
| const std::optional< Span > & | span () const |
| | Gets the error span if available.
|
Represents an error that occurred during script compilation or execution.
Contains a human-readable message and an optional source span.
Definition at line 25 of file error.hpp.
◆ Error()
| openpine::Error::Error |
( |
const char * | error_message, |
|
|
const Span * | span ) |
|
inline |
◆ errorMessage()
| const std::string & openpine::Error::errorMessage |
( |
| ) |
const |
|
inline |
Gets the error message.
- Returns
- The error message.
Definition at line 39 of file error.hpp.
◆ span()
| const std::optional< Span > & openpine::Error::span |
( |
| ) |
const |
|
inline |
Gets the error span if available.
- Returns
- The span if available, otherwise std::nullopt.
Definition at line 45 of file error.hpp.
Referenced by Error().
The documentation for this class was generated from the following file: