|
PineForge v1.4.0-4-g873b25da
Deterministic PineScript v6 backtest runtime — C ABI reference
|
#include <pineforge/run_failure_codes.hpp>#include <cstdint>#include <cstring>#include <exception>#include <memory>#include <stdexcept>#include <string>#include <type_traits>#include <utility>#include <vector>Go to the source code of this file.
Data Structures | |
| struct | pineforge::RunFailureArg |
| One typed argument as a raise site spells it. More... | |
| struct | pineforge::RunFailureValue |
| A validated code and its canonical arguments: the JSON object with its keys sorted and no whitespace, or null for a code without arguments ("{}"). More... | |
| class | pineforge::RunFailureInfo |
| The code carried beside a thrown exception. More... | |
| class | pineforge::coded< Base > |
Base with a code: throw coded<std::invalid_argument>(code, {args}, text). More... | |
Namespaces | |
| namespace | pineforge |
| namespace | pineforge::engine_script_run_v19 |
Macros | |
| #define | PINEFORGE_HAS_RUN_FAILURE_CODES_V1 1 |
Typedefs | |
| using | pineforge::RunFailureArgs = std::vector<RunFailureArg> |
Enumerations | |
| enum class | pineforge::RunFailureClass : std::uint8_t { pineforge::strategy , pineforge::strategy_limit , pineforge::no_data , pineforge::symbol_metadata , pineforge::symbol_feeds , pineforge::input , pineforge::unsupported , pineforge::resource , pineforge::engine_fault } |
The class a code belongs to (the catalog's class). More... | |
| enum class | pineforge::RunFailureArgKind : std::uint8_t { pineforge::identifier , pineforge::keyword , pineforge::vocab , pineforge::integer , pineforge::number , pineforge::pine_source , pineforge::symbol , pineforge::timeframe } |
An argument's kind (the catalog's kind). More... | |
Functions | |
| RunFailureValue | pineforge::make_run_failure (RunFailureCode code, const RunFailureArgs &args) noexcept |
Validate args against code's registry entry and canonicalize them. | |
| const char * | pineforge::run_failure_code_name (RunFailureCode code) noexcept |
| The code's catalog name ("" for none or an unknown value). | |
| RunFailureClass | pineforge::run_failure_code_class (RunFailureCode code) noexcept |
| The code's catalog class and retryable flag. | |
| bool | pineforge::run_failure_code_retryable (RunFailureCode code) noexcept |
| RunFailureValue | pineforge::classify_run_failure (const std::exception &error) noexcept |
| The code an exception carries: a coded exception's own; else the safety net by type (std::bad_alloc -> out_of_memory, std::logic_error -> engine_invariant, other -> engine_unclassified_error). | |
| void | pineforge::note_run_failure (BacktestEngine &engine, std::string text, RunFailureCode code, const RunFailureArgs &args={}) |
| void | pineforge::note_run_failure (BacktestEngine &engine, const char *text, RunFailureCode code, const RunFailureArgs &args={}) |
| void | pineforge::note_run_failure (BacktestEngine &engine, std::string text, const RunFailureValue &value) |
| void | pineforge::note_run_failure (BacktestEngine &engine, const char *entrypoint, const std::exception &error) |
| void | pineforge::note_run_failure_unknown (BacktestEngine &engine, const char *entrypoint) |
| void | pineforge::clear_run_failure (BacktestEngine &engine) noexcept |
| const char * | pineforge::run_failure_code_of (const BacktestEngine &engine) noexcept |
| The getters' answers (strategy_get_last_error_code / _args): the stored code while its text is the engine's last error; engine_unclassified_error for a non-empty error no coded site wrote; "" when there is no failure. | |
| const char * | pineforge::run_failure_args_of (const BacktestEngine &engine) noexcept |
| RunFailureValue | pineforge::run_failure_value_of (const BacktestEngine &engine) noexcept |
| The recorded value under the same rule (none when there is no failure). | |
| void | pineforge::pine_no_data_stop (const char *function, const char *call, std::int32_t line, const char *english) |
| void | pineforge::pine_other_symbol_stop (const char *function, const char *symbol_literal_or_null, const char *call, std::int32_t line, const char *english) |
| void | pineforge::pine_array_stop (const char *reason, const char *method_or_null, const char *english) |
| void | pineforge::pine_collection_stop (const char *collection, const char *reason, const char *english) |
| void | pineforge::pine_na_stop (const char *object, const char *english) |
| void | pineforge::pine_limit_stop (const char *limit, std::int64_t max, const char *english) |
| void | pineforge::pine_unsupported_stop (const char *reason, std::int32_t line, const char *english) |
| void | pineforge::pine_string_stop (const char *reason, const char *english) |
| void | pineforge::pine_engine_invariant (const char *english) |
| #define PINEFORGE_HAS_RUN_FAILURE_CODES_V1 1 |
Definition at line 130 of file run_failure.hpp.