4 ms·
> 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 exceptio
by saywhat2 7y ago
> 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/nsexception/1415537-reason?language=objc https://developer.apple.com/documentation/foundation/nsexcep...