mirror of
https://github.com/thestk/stk
synced 2026-01-15 14:01:52 +00:00
Version 3.2
This commit is contained in:
committed by
Stephen Sinclair
parent
4b6500d3de
commit
3f126af4e5
46
include/StkError.h
Normal file
46
include/StkError.h
Normal file
@@ -0,0 +1,46 @@
|
||||
/*************************************************/
|
||||
/*
|
||||
STK Error Handling Class
|
||||
by Gary P. Scavone, 2000.
|
||||
|
||||
This is a fairly abstract exception handling
|
||||
class. There could be sub-classes to take
|
||||
care of more specific error conditions ... or not.
|
||||
*/
|
||||
/*************************************************/
|
||||
|
||||
#if !defined(__StkError_h)
|
||||
#define __StkError_h
|
||||
|
||||
#include "Object.h"
|
||||
|
||||
class StkError : public Object
|
||||
{
|
||||
public:
|
||||
enum TYPE { UNSPECIFIED,
|
||||
FUNCTION_SYNTAX,
|
||||
FILE_NOT_FOUND,
|
||||
FILE_ERROR,
|
||||
PROCESS_THREAD,
|
||||
PROCESS_SOCKET,
|
||||
PROCESS_SOCKET_IPADDR,
|
||||
SOUNDCARD_NOT_FOUND,
|
||||
SOUNDCARD_CAPS,
|
||||
SOUNDCARD_CONTROL,
|
||||
MIDICARD_NOT_FOUND,
|
||||
MIDICARD_CAPS,
|
||||
MIDICARD_CONTROL
|
||||
};
|
||||
|
||||
protected:
|
||||
char errormsg[256];
|
||||
TYPE type;
|
||||
|
||||
public:
|
||||
StkError(const char *p, TYPE tipe = StkError::UNSPECIFIED);
|
||||
virtual ~StkError(void);
|
||||
virtual void printMessage(void);
|
||||
virtual const TYPE& getType(void) { return type; }
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user