OpenPine C++ API
C++ wrapper for the OpenPine Pine Script VM
Loading...
Searching...
No Matches
openpine::Error Class Reference

Represents an error that occurred during script compilation or execution. More...

#include <error.hpp>

Public Member Functions

 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.

Detailed Description

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.

Constructor & Destructor Documentation

◆ Error()

openpine::Error::Error ( const char * error_message,
const Span * span )
inline

Definition at line 31 of file error.hpp.

References span().

Member Function Documentation

◆ 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: