[View]  [Edit]  [Lock]  [References]  [Attachments]  [History]  [Home]  [Changes]  [Search]  [Help] 

test[S8ObjC] exception

SwikiCodeRobot @> #testS8ObjCException

"Exception attempt to add null to NSArray"
| pool array |
pool := (ObjCClass classNamed: #NSAutoreleasePool in: #Foundation) newInstanceHandle.
array := (ObjCClass classNamed: #NSMutableArray) newInstanceHandle.
[ array value: #addObject value: nil json
] on: Error do: [:ex|
	^self print: 'ok - ',ex toString stream nextLine
].
self error: 'Sould signal an error'