|
Samond Classes Library 1.1.6-RELEASE build 132
|
00001 // 00002 // SCSystemException.h 00003 // scl 00004 // 00005 // Created by Viacheslav Smolensky on 22.03.12. 00006 // Copyright (c) 2007 - 2014 by Samond Development Corporation. All rights reserved. 00007 // 00008 00016 #import <scl/SCException.h> 00017 00018 #define SCSystemExceptionClass @"SCSystemException" ///< SCSystemException class name 00019 00020 #pragma mark - 00021 #pragma mark Class related constants 00022 00023 #define SCUnspecifiedSystemError 0 ///< Number of unspecified system error 00024 00025 #pragma mark - 00026 #pragma mark Exception name constant 00027 00028 #define SCSystemErrorName @"SCSystem" ///< Name of exception 00029 00030 #pragma mark - 00031 00041 @interface SCSystemException : SCException { 00042 SCSystemError fError; // System error number 00043 NSString *fObjectName; // Erroneous object name 00044 } 00045 #pragma mark - 00046 #pragma mark Class properties 00047 #if (__MAC_OS_X_VERSION_MIN_REQUIRED > 1040) || IOS_TARGET 00048 // System error number property 00049 @property (nonatomic, assign, readonly, getter=error) SCSystemError error; 00050 // Erroneous object name property 00051 @property (nonatomic, retain, readonly, getter=objectName) NSString *objectName; 00052 #endif 00053 00054 #pragma mark - 00055 #pragma mark Creating System Exception 00056 00061 + (SCSystemException *)exception; 00062 00069 + (SCSystemException *)exceptionWithError:(SCSystemError)error name:(NSString *)name; 00070 00076 + (SCSystemException *)exceptionWithError:(SCSystemError)error; 00077 00083 + (SCSystemException *)exceptionWithReason:(NSString *)reason; 00084 00085 #pragma mark - 00086 #pragma mark Initializing System Exception 00087 00092 - (id)init; 00093 00100 - (id)initWithError:(SCSystemError)error name:(NSString *)name; 00101 00107 - (id)initWithError:(SCSystemError)error; 00108 00114 - (id)initWithReason:(NSString *)reason; 00115 00116 #pragma mark - 00117 #pragma mark Querying Exception Properties 00118 00123 - (SCSystemError)error; 00124 00129 - (NSString *)objectName; 00130 00131 @end
1.7.3