Mercurial > projects > dstep
comparison dstep/foundation/NSException.d @ 15:7ff919f595d5
Added the Foundation framework, again
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Mon, 03 Aug 2009 15:31:48 +0200 |
parents | 89f3c3ef1fd2 |
children | 19885b43130e |
comparison
equal
deleted
inserted
replaced
14:89f3c3ef1fd2 | 15:7ff919f595d5 |
---|---|
60 { | 60 { |
61 mixin ObjcWrap; | 61 mixin ObjcWrap; |
62 | 62 |
63 static NSAssertionHandler currentHandler () | 63 static NSAssertionHandler currentHandler () |
64 { | 64 { |
65 return invokeObjcSelfClass!(NSAssertionHandler, "currentHandler"return result is this.objcObject ? this : (result !is null ? new NSAssertionHandler(result) : null); } | 65 return invokeObjcSelfClass!(NSAssertionHandler, "currentHandler"); |
66 } | |
66 | 67 |
67 void handleFailureInMethod (SEL selector, Object object, NSString fileName, NSInteger line, NSString description, ...) | 68 void handleFailureInMethod (SEL selector, Object object, NSString fileName, NSInteger line, NSString description, ...) |
68 { | 69 { |
69 return invokeObjcSelf!(void, "handleFailureInMethod:object:file:lineNumber:description:", SEL, Object, NSString, NSInteger, NSString)(selector, object, fileName, line, description); | 70 return invokeObjcSelf!(void, "handleFailureInMethod:object:file:lineNumber:description:", SEL, Object, NSString, NSInteger, NSString)(selector, object, fileName, line, description); |
70 } | 71 } |
80 mixin ObjcWrap; | 81 mixin ObjcWrap; |
81 mixin TNSExceptionRaisingConveniences; | 82 mixin TNSExceptionRaisingConveniences; |
82 | 83 |
83 static NSException exceptionWithName (NSString name, NSString reason, NSDictionary userInfo) | 84 static NSException exceptionWithName (NSString name, NSString reason, NSDictionary userInfo) |
84 { | 85 { |
85 return invokeObjcSelfClass!(NSException, "exceptionWithName:reason:userInfo:", NSString, NSString, NSDictionary)(name, reason, userInforeturn result is this.objcObject ? this : (result !is null ? new NSException(result) : null); } | 86 return invokeObjcSelfClass!(NSException, "exceptionWithName:reason:userInfo:", NSString, NSString, NSDictionary)(name, reason, userInfo); |
87 } | |
86 | 88 |
87 Object initWithName (NSString aName, NSString aReason, NSDictionary aUserInfo) | 89 Object initWithName (NSString aName, NSString aReason, NSDictionary aUserInfo) |
88 { | 90 { |
89 return invokeObjcSelf!(Object, "initWithName:reason:userInfo:", NSString, NSString, NSDictionary)(aName, aReason, aUserInfo); | 91 return invokeObjcSelf!(Object, "initWithName:reason:userInfo:", NSString, NSString, NSDictionary)(aName, aReason, aUserInfo); |
90 } | 92 } |