Better HN
topnewbestaskshowjobs
Log inSign up

saywhat2

2 karma · joined May 21, 2019 (7y ago) · 1 submissions

Submissions

comment 7y ago · link · parent

> If you'd like to know why an exception was thrown, you have to print the value of the proper CPU register.

I'm not sure what you mean. To see why an exception was thrown you can call [-NSException reason][0]. If you're stopped in your catch block in the debugger, it's as simple as typing:

> call (NSString*)[e reason]

Assuming your exception is named "e".

[0]https://developer.apple.com/documentation/foundation/nsexcep...