BlitzMax Extended  0.8.19
Pushing Blitz to the Max.
blitz_exception.h
Go to the documentation of this file.
1 
10 #ifndef BLITZ_EX_EXCEPTION_H
11 #define BLITZ_EX_EXCEPTION_H
12 
13 #include "_common.h"
14 
15 BB_BEGIN_DECLS
16 
26 {
34 
35  int refs;
36 
45 };
46 
47 // For internal usage only
48 enum bb_exception_vfnkey_e
49 {
50  __BBEXCEPTION_VFN_INITCAUSE__,
51  __BBEXCEPTION_VFN_GETCAUSE__
52 };
53 
54 struct bb_exception_vfns_s
55 {
56  // Initializes an exception's cause using its own class' virtual function
57  void (*InitCause)(BBException *ex, BBException *cause);
58 
59  // Gets an exception's cause using its own class' virtual function
60  BBException* (*GetCause)(BBException *ex);
61 };
62 
63 typedef struct bb_exception_vfns_s __BBExceptionVfns;
64 
65 extern BBClass bbExceptionClass;
66 
67 void bbExceptionCtor(BBException *ex);
68 void bbExceptionDtor(BBException *ex);
69 
70 BBInt bbExceptionCompare(const BBException *ex, const BBException *rhs);
71 BBException* bbExceptionClone(BBException *ex);
72 
80 BBException* bbExceptionGetCause(const BBException *ex);
81 
94 void bbExceptionInitCause(BBException *ex, BBException *cause);
95 
96 BB_END_DECLS
97 
98 #endif // BLITZ_EX_EXCEPTION_H