{"id":7188,"date":"2013-03-21T17:10:08","date_gmt":"2013-03-21T22:10:08","guid":{"rendered":"http:\/\/mjtsai.com\/blog\/?p=7188"},"modified":"2014-04-15T20:26:37","modified_gmt":"2014-04-16T00:26:37","slug":"jserrorstacktrace","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2013\/03\/21\/jserrorstacktrace\/","title":{"rendered":"JSErrorStackTrace"},"content":{"rendered":"<p>Javier Soto&rsquo;s <a href=\"https:\/\/github.com\/JaviSoto\/JSErrorStackTrace\">JSErrorStackTrace<\/a> is a &ldquo;category on NSError that stores the stack trace of the creation of the NSError object for later retrieval&rdquo; (via <a href=\"https:\/\/twitter.com\/romainbriche\/status\/314624959613894656\">Romain Briche<\/a>). It&rsquo;s very useful to have this attached to an error object. He swizzles the initializer and gets the stack trace using <code>-[NSThread callStackSymbols]<\/code>. That method wasn&rsquo;t available when I wrote my code, which adds stack frames to the error&rsquo;s user info as it&rsquo;s propagated.<\/p>","protected":false},"excerpt":{"rendered":"<p>Javier Soto&rsquo;s JSErrorStackTrace is a &ldquo;category on NSError that stores the stack trace of the creation of the NSError object for later retrieval&rdquo; (via Romain Briche). It&rsquo;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&rsquo;t available when I [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"","apple_news_api_id":"","apple_news_api_modified_at":"","apple_news_api_revision":"","apple_news_api_share_url":"","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[4],"tags":[69,391,857,54,74,71],"class_list":["post-7188","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-cocoa","tag-jserrorstacktrace","tag-nserror","tag-objective-c","tag-opensource","tag-programming"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/7188","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=7188"}],"version-history":[{"count":2,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/7188\/revisions"}],"predecessor-version":[{"id":8700,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/7188\/revisions\/8700"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=7188"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=7188"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=7188"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}