-
Notifications
You must be signed in to change notification settings - Fork 2
/
error.h
105 lines (91 loc) · 2.32 KB
/
error.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
#ifndef INCLUDE_BLASSIC_ERROR_H
#define INCLUDE_BLASSIC_ERROR_H
// error.h
// Revision 7-feb-2005
#include "blassic.h"
#include <string>
#include <iostream>
const BlErrNo
ErrNoError= 0,
ErrSyntax= 1,
ErrMismatch= 2,
ErrGosubWithoutReturn= 3,
ErrReturnWithoutGosub= 4,
ErrNextWithoutFor= 5,
ErrNotImplemented= 6,
ErrDivZero= 7,
ErrDataExhausted= 8,
ErrInvalidCommand= 9,
ErrPolite= 10,
ErrBadSubscript= 11,
ErrOutMemory= 12,
ErrAlreadyDim= 13,
ErrNoContinue= 14,
ErrFileNumber= 15,
ErrFileMode= 16,
ErrFileAlreadyOpen= 17,
ErrFileRead= 18,
ErrFileWrite= 19,
ErrUntilWithoutRepeat= 20,
ErrWendWithoutWhile= 21,
ErrWhileWithoutWend= 22,
ErrBlassicInternal= 23,
ErrNoDynamicLibrary= 24,
ErrNoDynamicSymbol= 25,
ErrCannotResume= 26,
ErrNoLabel= 27,
ErrMisplacedLocal= 28,
ErrFieldOverflow= 29,
ErrFileNotFound= 30,
ErrLineExhausted= 31,
ErrFunctionNoDefined= 32,
ErrIncompleteDef= 33,
ErrInvalidDirect= 34,
ErrBadRecord= 35,
ErrFunctionCall= 36,
ErrSocket= 37,
ErrRenameFile= 38,
ErrOperatingSystem= 39,
ErrPastEof= 40,
ErrNoGraphics= 41,
ErrImproperArgument= 42,
ErrDomain= 43,
ErrRange= 44,
ErrLineNotExist= 45,
ErrFnRecursion= 46,
ErrOverflow= 48,
ErrRegexp= 49,
ErrDynamicUnsupported= 50,
ErrRepeatWithoutUntil= 51,
ErrUnexpectedFnEnd= 52,
ErrNoFnEnd= 53,
ErrDuplicateLabel= 54,
ErrNoTeDejo= 55;
class BlError {
public:
BlError ();
BlError (BlErrNo nerr);
BlError (BlErrNo nerr, ProgramPos npos);
void clear ();
void set (BlErrNo nerr, ProgramPos npos);
void seterr (BlErrNo nerr);
BlErrNo geterr () const;
ProgramPos getpos () const;
friend std::ostream & operator << (std::ostream & os,
const BlError & be);
private:
BlErrNo err;
ProgramPos pos;
};
class BlBreak { };
class BlBreakInPos {
ProgramPos pos;
public:
BlBreakInPos (ProgramPos pos);
ProgramPos getpos () const;
};
std::ostream & operator << (std::ostream & os, const BlBreakInPos & bbip);
std::string ErrStr (BlErrNo err);
bool showdebuginfo ();
#endif
// Fin de error.h