Samond Classes Library 1.1.6-RELEASE build 132

SCNumberException.h

Go to the documentation of this file.
00001 //
00002 //  SCNumberException.h
00003 //  scl
00004 //
00005 //  Created by Viacheslav Smolensky on 17.04.12.
00006 //  Copyright (c) 2007 - 2014 by Samond Development Corporation. All rights reserved.
00007 //
00008 
00015 #import <Foundation/Foundation.h>
00016 #import <scl/SCException.h>
00017 
00018 #define SCNumberExceptionClass @"SCNumberException" ///< SCNumberException class name
00019 
00020 #pragma mark Exception supporting types
00021 
00027 enum _SCNumberError {
00028         SCNumberErrorUnspecified        = 0,    
00029         SCNumberErrorUnsupported        = 1,    
00030 };
00031 
00037 typedef enum _SCNumberError SCNumberError;
00038 
00039 #pragma mark -
00040 #pragma mark Exception name constant
00041 
00043 #define SCNumberErrorName   @"SCNumber" ///< Name of exception
00044 
00045 #pragma mark -
00046 
00056 @interface SCNumberException : SCException {
00057         SCNumberError fType;            // Exception type
00058         NSString *fUnsupportedType;     // Unsupported type name
00059 }
00060 #pragma mark -
00061 #pragma mark Class properties
00062 #if (__MAC_OS_X_VERSION_MIN_REQUIRED > 1040) || IOS_TARGET
00063 // Number exception type property
00064 @property (assign, readonly, getter=type) SCNumberError type;
00065 // Unsupported type name property
00066 @property (retain, readonly, getter=unsupportedType) NSString *unsupportedType;
00067 #endif
00068 
00069 #pragma mark -
00070 #pragma mark Creating and Initializing Generic Number Exception
00071 
00076 + (SCNumberException *)exception;
00077 
00084 + (SCNumberException *)exceptionWithType:(SCNumberError)type reason:(NSString *)reason;
00085 
00091 + (SCNumberException *)exceptionWithType:(SCNumberError)type;
00092 
00098 + (SCNumberException *)exceptionWithReason:(NSString *)reason;
00099 
00104 - (id)init;
00105 
00112 - (id)initWithType:(SCNumberError)type reason:(NSString *)reason;
00113 
00119 - (id)initWithType:(SCNumberError)type;
00120 
00126 - (id)initWithReason:(NSString *)reason;
00127 
00128 #pragma mark -
00129 #pragma mark Creating and Initializing Unsupported Type Exception
00130 
00138 + (SCNumberException *)exceptionWithUnsupportedType:(NSString *)type reason:(NSString *)reason;
00139 
00145 + (SCNumberException *)exceptionWithUnsupportedType:(NSString *)type;
00146 
00152 + (SCNumberException *)exceptionWithNumberUnsupportedTypeReason:(NSString *)reason;
00153 
00158 + (SCNumberException *)exceptionWithNumberUnsupportedType;
00159 
00167 - (id)initWithUnsupportedType:(NSString *)type reason:(NSString *)reason;
00168 
00174 - (id)initWithUnsupportedType:(NSString *)type;
00175 
00181 - (id)initWithNumberUnsupportedTypeReason:(NSString *)reason;
00182 
00187 - (id)initWithNumberUnsupportedType;
00188 
00189 #pragma mark -
00190 #pragma mark Querying Exception Properties
00191 
00196 - (SCNumberError)type;
00197 
00202 - (NSString *)unsupportedType;
00203 
00204 @end
 All Classes Files Functions Typedefs Enumerations Enumerator Defines