Subversion Repositories Kolibri OS

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
4680 right-hear 1
 
2
#define __lisperror_h__
3
4
 
5
#include "lispstring.h"
6
7
 
8
9
 
10
 
11
{
12
    KLispErrNone = 0,
13
    KLispErrInvalidArg        ,
14
    KLispErrWrongNumberOfArgs ,
15
    KLispErrNotList           ,
16
    KLispErrListNotLongEnough ,
17
    KLispErrInvalidStack      ,
18
    KQuitting                 ,
19
    KLispErrNotEnoughMemory   ,
20
    KInvalidToken             ,
21
    KLispErrInvalidExpression ,
22
    KLispErrUnprintableToken  ,
23
    KLispErrFileNotFound      ,
24
    KLispErrReadingFile       ,
25
    KLispErrCreatingUserFunction,
26
    KLispErrCreatingRule        ,
27
    KLispErrArityAlreadyDefined ,
28
    KLispErrCommentToEndOfFile  ,
29
    KLispErrNotString           ,
30
    KLispErrNotInteger          ,
31
    KLispErrParsingInput        ,
32
    KLispErrMaxRecurseDepthReached,
33
    KLispErrDefFileAlreadyChosen  ,
34
    KLispErrDivideByZero          ,
35
    KLispErrNotAnInFixOperator    ,
36
    KLispErrUser                  ,
37
    KLispErrIsNotInFix            ,
38
    KLispErrSecurityBreach        ,
39
    KLispErrLibraryNotFound       ,
40
    KLispErrUserInterrupt         ,
41
    KLispErrNonBooleanPredicateInPattern,
42
    KLispErrGenericFormat,
43
    KLispNrErrors
44
};
45
46
 
47
 
48
inline void Check(T hastobetrue, LispInt aError)
49
{
50
    if (!hastobetrue)
51
        LispThrow(aError);
52
}
53
54
 
55
 
56
#define DBG_printf printf
57
#define DBG_(xxx) xxx
58
#else
59
namespace{void inline noop(...) {}}
60
// could change 'noop' to 'sizeof' below, but we get 'left-hand operand of comma has no effect' from g++
61
#define DBG_printf while (0) noop
62
#define DBG_(xxx) /*xxx*/
63
#endif
64
65
 
66
 
67