Thursday, Mar 21, 2013 [Tweets] [Favorites]


Javier Soto’s JSErrorStackTrace is a “category on NSError that stores the stack trace of the creation of the NSError object for later retrieval” (via Romain Briche). It’s very useful to have this attached to an error object. He swizzles the initializer and gets the stack trace using -[NSThread callStackSymbols]. That method wasn’t available when I wrote my code, which adds stack frames to the error’s user info as it’s propagated.


Stay up-to-date by subscribing to the Comments RSS Feed for this post.

Leave a Comment