Samond Classes Library 1.2.6-STABLE build 219
SCRuntimeException.h
Go to the documentation of this file.
1 //
2 // SCRuntimeException.h
3 // scl
4 //
5 // Created by Viacheslav Smolensky on 11.12.17.
6 // Copyright (c) 2007 - 2018 by Samond Development Corporation. All rights reserved.
7 //
8 
22 #import <scl/SCException.h>
23 
24 #pragma mark -
25 #pragma mark Class Constants
26 
35 #define SCRuntimeExceptionClass @"SCRuntimeException"
36 
41 #define SCRuntimeErrorName @"SCRuntime"
42 
43 @class SCRuntimeProtocol;
44 
45 #pragma mark -
46 #pragma mark Error ID Constants
47 
56 #define SCRuntimeEIDUnspecified @"SCL-20080"
57 
62 #define SCRuntimeEIDClass @"SCL-20081"
63 
68 #define SCRuntimeEIDSelector @"SCL-20082"
69 
74 #define SCRuntimeEIDImplementation @"SCL-20083"
75 
80 #define SCRuntimeEIDType @"SCL-20084"
81 
86 #define SCRuntimeEIDProperty @"SCL-20085"
87 
92 #define SCRuntimeEIDProtocol @"SCL-20086"
93 
98 #define SCRuntimeEIDVariable @"SCL-20087"
99 
104 #define SCRuntimeEIDMethod @"SCL-20088"
105 
106 #pragma mark -
107 #pragma mark Class Support Types
108 
117 typedef enum {
123 
129 
135 
141 
147 
153 
159 
165 
171 
173 
174 #pragma mark -
175 
210  NSString *_class_name; // Class name
211  NSString *_type; // Type name
212  NSString *_method; // Method name
213  NSString *_protocol; // Protocol name
214  NSString *_property; // Property name
215  NSString *_variable; // Instance variable name
216  NSString *_superclass_name; // Superclass name
217 }
218 #pragma mark -
219 #pragma mark Instance Properties
220 
229 @property (nonatomic, readonly, retain) NSString *class_name;
230 
235 @property (nonatomic, readonly, retain) NSString *type;
236 
241 @property (nonatomic, readonly, retain) NSString *method;
242 
247 @property (nonatomic, readonly, retain) NSString *protocol;
248 
253 @property (nonatomic, readonly, retain) NSString *property;
254 
259 @property (nonatomic, readonly, retain) NSString *variable;
260 
265 @property (nonatomic, readonly, retain) NSString *superclass_name;
266 
269 #pragma mark -
270 #pragma mark Creating and Initializing the Generic Runtime Exception
271 + (instancetype)exceptionWithReason:(NSString *)reason code:(SCInteger)code eid:(NSString *)eid;
272 + (instancetype)exception;
273 - (instancetype)initWithReason:(NSString *)reason code:(SCInteger)code eid:(NSString *)eid;
274 
275 #pragma mark -
276 #pragma mark Creating Class Exceptions (SCL-20081)
277 + (instancetype)exceptionWithUnspecifiedClass;
278 + (instancetype)exceptionWithUnspecifiedClassOfMethod:(NSString *)method;
279 + (instancetype)exceptionWithUnspecifiedClassOfProperty:(NSString *)property;
280 + (instancetype)exceptionWithUnspecifiedClassOfVariable:(NSString *)variable;
281 + (instancetype)exceptionWithUnspecifiedClassOfProtocol:(NSString *)protocol;
282 + (instancetype)exceptionWithDuplicatedClass:(NSString *)class;
283 + (instancetype)exceptionWithAlreadyRegisteredClass:(NSString *)class;
284 + (instancetype)exceptionWithRegisteredClass:(NSString *)class;
285 + (instancetype)exceptionWithUnknownClass:(NSString *)class;
286 + (instancetype)exceptionWithIncorrectSuperclass:(NSString *)superclass class:(NSString *)class;
287 
288 #pragma mark -
289 #pragma mark Creating Selector Exceptions (SCL-20082)
290 + (instancetype)exceptionWithUnspecifiedSelectorOfClass:(Class)class;
291 + (instancetype)exceptionWithUnspecifiedSelectorOfProtocol:(SCRuntimeProtocol *)protocol;
292 + (instancetype)exceptionWithUnspecifiedSelector;
293 
294 #pragma mark -
295 #pragma mark Creating Implementation Exceptions (SCL-20083)
296 + (instancetype)exceptionWithNullImplementation;
297 + (instancetype)exceptionWithNullImplementationOfMethod:(NSString *)method class:(NSString *)class;
298 
299 #pragma mark -
300 #pragma mark Creating Type Exceptions (SCL-20084)
301 + (instancetype)exceptionWithReturnType:(NSString *)type method:(NSString *)method class:(NSString *)class;
302 + (instancetype)exceptionWithReturnType:(NSString *)type method:(NSString *)method;
303 + (instancetype)exceptionWithReturnType:(NSString *)type;
304 + (instancetype)exceptionWithType:(NSString *)type property:(NSString *)property class:(NSString *)class;
305 + (instancetype)exceptionWithType:(NSString *)type variable:(NSString *)property class:(NSString *)class;
306 
307 #pragma mark -
308 #pragma mark Creating Property Exceptions (SCL-20085)
309 + (instancetype)exceptionWithUnspecifiedPropertyOfClass:(Class)class;
310 + (instancetype)exceptionWithUnspecifiedPropertyOfProtocol:(Protocol *)protocol;
311 + (instancetype)exceptionWithUnknownProperty:(NSString *)property class:(Class)class;
312 + (instancetype)exceptionWithReadOnlyProperty:(NSString *)property class:(Class)class;
313 
314 #pragma mark -
315 #pragma mark Creating Protocol Exceptions (SCL-20086)
316 + (instancetype)exceptionWithUnspecifiedProtocol;
317 + (instancetype)exceptionWithUnspecifiedProtocolOfClass:(NSString *)class;
318 + (instancetype)exceptionWithDuplicatedProtocol:(NSString *)protocol;
319 + (instancetype)exceptionWithUnknownProtocol:(NSString *)protocol;
320 + (instancetype)exceptionWithRegisteredProtocol:(NSString *)protocol;
321 + (instancetype)exceptionWithAlreadyRegisteredProtocol:(NSString *)protocol;
322 
323 #pragma mark -
324 #pragma mark Creating Variable Exceptions (SCL-20087)
325 + (instancetype)exceptionWithUnspecifiedVariableOfClass:(Class)class;
326 + (instancetype)exceptionWithUnknownVariable:(NSString *)variable class:(Class)class;
327 
328 #pragma mark -
329 #pragma mark Creating Method Exceptions (SCL-20088)
330 + (instancetype)exceptionWithUnspecifiedMethodOfProtocol:(NSString *)protocol;
331 + (instancetype)exceptionWithUnspecifiedMethodOfClass:(NSString *)class;
332 + (instancetype)exceptionWithUnknownMethod:(NSString *)method class:(NSString *)class;
333 + (instancetype)exceptionWithSignatureOfMethod:(NSString *)method class:(NSString *)class;
334 
335 @end
Exception class SCRuntimeException.
Definition: SCRuntimeException.h:209
Definition: SCRuntimeException.h:158
Representation of a protocols.
Definition: SCRuntimeProtocol.h:77
int32_t SCInteger
Definition: SCTypes.h:149
Definition: SCRuntimeException.h:134
Definition: SCRuntimeException.h:146
Definition: SCRuntimeException.h:122
Definition: SCRuntimeException.h:140
Parent class of all library exceptions.
Definition: SCException.h:72
Definition: SCRuntimeException.h:170
Definition: SCRuntimeException.h:164
SCRuntimeError
Definition: SCRuntimeException.h:117
Exception SCException header file.
Definition: SCRuntimeException.h:128
Definition: SCRuntimeException.h:152