Leonardus
Loading...
Searching...
No Matches
error.h
Go to the documentation of this file.
1
17#pragma once
18
19// Inc Library
20#include <string>
21#include <cstdint>
22#include <source_location>
23
24
26#define ERRPRAEFIX "leo"
27
28
40
48
50[[noreturn]] void opErrExit( OpError p_err,
51 const std::string & p_details = "" ,
52 const std::source_location p_location = std::source_location::current()
53 );
54
56[[noreturn]] void inErrExit( InError p_err,
57 const std::string & p_details = "" ,
58 const std::source_location p_location = std::source_location::current()
59 );
60
62[[noreturn]] void panicExit();
void panicExit()
Panic exit( EC_PANIC ).
Definition error.cpp:106
OpError
Operator error code enum.
Definition error.h:30
@ undefinedresult
PS operator error undefinedresult.
Definition error.h:37
@ invalidexit
PS operator error invalidexit.
Definition error.h:31
@ unmatchedmark
PS operator error unmatchedmark.
Definition error.h:35
@ typecheck
PS operator error typecheck.
Definition error.h:34
@ rangecheck
PS operator error rangecheck.
Definition error.h:32
@ dictstackunderflow
PS operator error dictstackunderflow.
Definition error.h:36
@ undefined
PS operator error undefined.
Definition error.h:38
@ stackunderflow
PS operator error stackunderflow.
Definition error.h:33
InError
Interpreter error code enum.
Definition error.h:42
@ parsererror
explicit or implicit error from pass 1
Definition error.h:44
@ cmdline
command line usage error
Definition error.h:43
@ semantics
infinite nesting of arrays; infinite loop loading values from dictionary;
Definition error.h:45
@ internal
float formating; context not initialized; counter less than zero; non dictionary object on dictionary...
Definition error.h:46
void inErrExit(InError p_err, const std::string &p_details="", const std::source_location p_location=std::source_location::current())
Interpreter error message to interpreter cout_ and exit( EC_INTERPRETER / EC_CMDLINE ).
Definition error.cpp:74
void opErrExit(OpError p_err, const std::string &p_details="", const std::source_location p_location=std::source_location::current())
Operator error message to interpreter cout_ and exit( EC_OPERATOR ).
Definition error.cpp:31