Sha256: 7334cfea777e0fb2f45dd885a4115fc8f0ac6961840b569e8e18154d41d4f9ff

Contents?: true

Size: 1.03 KB

Versions: 8

Compression:

Stored size: 1.03 KB

Contents

#import "OCSException.h"

@interface OCSException ()

@property (nonatomic, strong) NSString* message;

@end

@implementation OCSException

+(id) exceptionWithNSException:(NSException*) givenException {
    NSString* formattedMessage = [NSString stringWithFormat: @"%@ %@",
                                  [givenException name],
                                  [givenException reason]];
    return [[self alloc] initWithFormattedMessage: formattedMessage];
}

+(id) exceptionWithMessage:(NSString*) message, ... NS_FORMAT_FUNCTION(1,2) {
    va_list args;
    va_start(args, message);
    NSString *formattedMessage = [[NSString alloc] initWithFormat: message arguments:args];
    va_end(args);
    return [[self alloc] initWithFormattedMessage: formattedMessage];
}

-(id) initWithFormattedMessage:(NSString*) formattedMessage {
    if ((self = [super init])) {
        self.message = formattedMessage;
    }
    return self;
}

-(NSString*) stringValue {
    return [NSString stringWithFormat: @"__EXCEPTION__:message:<<%@>>", self.message];
}

@end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
xcfit-0.9.0 XCFitDemo/Pods/cslim/src/ExecutorObjectiveC/OCSException.m
xcfit-0.8.0 XCFitDemo/Pods/cslim/src/ExecutorObjectiveC/OCSException.m
xcfit-0.7.0 XCFitDemo/Pods/cslim/src/ExecutorObjectiveC/OCSException.m
xcfit-0.6.0 XCFitDemo/Pods/cslim/src/ExecutorObjectiveC/OCSException.m
xcfit-0.5.0 XCFitDemo/Pods/cslim/src/ExecutorObjectiveC/OCSException.m
xcfit-0.4.0 XCFitDemo/Pods/cslim/src/ExecutorObjectiveC/OCSException.m
xcfit-0.3.0 XCFitDemo/Pods/cslim/src/ExecutorObjectiveC/OCSException.m
xcfit-0.2.0 XCFitDemo/Pods/cslim/src/ExecutorObjectiveC/OCSException.m