Mark Slee | 33a7d89 | 2007-09-14 19:44:30 +0000 | [diff] [blame] | 1 | #import "TException.h" |
| 2 | #import "TProtocol.h" |
| 3 | |
Mark Slee | 7e9eea4 | 2007-09-10 21:00:23 +0000 | [diff] [blame] | 4 | enum { |
| 5 | TApplicationException_UNKNOWN = 0, |
| 6 | TApplicationException_UNKNOWN_METHOD = 1, |
| 7 | TApplicationException_INVALID_MESSAGE_TYPE = 2, |
| 8 | TApplicationException_WRONG_METHOD_NAME = 3, |
| 9 | TApplicationException_BAD_SEQUENCE_ID = 4, |
| 10 | TApplicationException_MISSING_RESULT = 5 |
| 11 | }; |
| 12 | |
| 13 | // FIXME |
Mark Slee | 33a7d89 | 2007-09-14 19:44:30 +0000 | [diff] [blame] | 14 | @interface TApplicationException : TException { |
| 15 | int mType; |
Mark Slee | 7e9eea4 | 2007-09-10 21:00:23 +0000 | [diff] [blame] | 16 | } |
| 17 | |
| 18 | + (TApplicationException *) read: (id <TProtocol>) protocol; |
| 19 | |
Mark Slee | 8440605 | 2007-11-20 01:39:25 +0000 | [diff] [blame] | 20 | - (void) write: (id <TProtocol>) protocol; |
| 21 | |
Mark Slee | 7e9eea4 | 2007-09-10 21:00:23 +0000 | [diff] [blame] | 22 | + (TApplicationException *) exceptionWithType: (int) type |
Mark Slee | 33a7d89 | 2007-09-14 19:44:30 +0000 | [diff] [blame] | 23 | reason: (NSString *) message; |
Mark Slee | 7e9eea4 | 2007-09-10 21:00:23 +0000 | [diff] [blame] | 24 | |
| 25 | @end |