2013-07-24 21:15:11 +00:00
|
|
|
/*
|
2013-07-25 14:42:02 +00:00
|
|
|
abCError.h
|
2013-07-24 21:15:11 +00:00
|
|
|
By: Jeremy Rand
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
2013-07-25 14:42:02 +00:00
|
|
|
#ifndef ABCERROR_H
|
|
|
|
#define ABCERROR_H
|
2013-07-24 21:15:11 +00:00
|
|
|
|
|
|
|
|
|
|
|
typedef enum abCalcErrorType {
|
|
|
|
abCalcErrorTypeMin = 0,
|
|
|
|
abCalcNoError,
|
|
|
|
abCalcSyntaxError,
|
|
|
|
abCalcBadArgTypeError,
|
|
|
|
abCalcBadArgValueError,
|
|
|
|
abCalcTooFewArgsError,
|
|
|
|
abCalcStackFullError,
|
2013-07-24 23:59:18 +00:00
|
|
|
abCalcInfiniteResultError,
|
|
|
|
abCalcComplexResultError,
|
2013-07-24 21:15:11 +00:00
|
|
|
|
|
|
|
abCalcErrorTypeMax
|
|
|
|
} abCalcErrorType;
|
|
|
|
|
|
|
|
|
|
|
|
void abCalcErrorInit(void);
|
|
|
|
|
|
|
|
void abCalcRaiseError(abCalcErrorType type, char *opName);
|
|
|
|
|
|
|
|
char *abCalcGetError(void);
|
|
|
|
|
|
|
|
void abCalcClearError(void);
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|