{"id":8981,"date":"2006-12-29T11:10:00","date_gmt":"2006-12-29T11:10:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/powershell\/2006\/12\/29\/documenting-trap-and-throw\/"},"modified":"2019-02-18T13:20:59","modified_gmt":"2019-02-18T20:20:59","slug":"documenting-trap-and-throw","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/powershell\/documenting-trap-and-throw\/","title":{"rendered":"Documenting TRAP and THROW"},"content":{"rendered":"<p>We pride ourselves about being a bit overboard when it comes to Error handling.&nbsp; That is why&nbsp;our sparse (non-existing?) documentation of THROW and TRAP handling&nbsp;is both ironic and sad.&nbsp; 10,000 apologizes for that, we&#8217;ll fix it in the next release.&nbsp; <\/p>\n<p>In the mean time, it&#8217;s <a href=\"http:\/\/sapien.eponym.com\/\">Don Jones<\/a> amd <a href=\"http:\/\/jdhitsolutions.blogspot.com\/\">Jeffery Hicks<\/a> to the rescue.&nbsp; Don and Jeffery are the co-authors of <a href=\"http:\/\/www.scriptingoutpost.com\/ProductInfo.aspx?productid=BK-TFM-PSH\">Windows PowerShell: TFM<\/a>.&nbsp; The great thing about that is that they decided to &#8220;give you a taste&#8221; of the book so you can see whether you might be interesting in buying it.&nbsp; It is our collective good luck that they made <a href=\"http:\/\/www.sapienpress.com\/powershell.pdf\">Chapter 11 Debugging and Error Handling<a> as the sample chapter.&nbsp; Click on the Chapter in the previous sentence and it will bring you to the chapter.&nbsp; If that doesn&#8217;t work &#8211; go to: http:\/\/www.sapienpress.com\/powershell.pdf <\/a>.<\/p>\n<p>BTW &#8211; their book recently went to Press so it should be available any day now.&nbsp; I can&#8217;t wait to get my copy.<\/p>\n<p>Cheers!<\/p>\n<p>Jeffrey Snover [MSFT]<br \/>Windows PowerShell\/MMC Architect<br \/>Visit the Windows PowerShell Team blog at:&nbsp;&nbsp;&nbsp; <a href=\"http:\/\/blogs.msdn.com\/PowerShell\">http:\/\/blogs.msdn.com\/PowerShell<\/a><br \/>Visit the Windows PowerShell ScriptCenter at:&nbsp; <a href=\"http:\/\/www.microsoft.com\/technet\/scriptcenter\/hubs\/msh.mspx\">http:\/\/www.microsoft.com\/technet\/scriptcenter\/hubs\/msh.mspx<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>We pride ourselves about being a bit overboard when it comes to Error handling.&nbsp; That is why&nbsp;our sparse (non-existing?) documentation of THROW and TRAP handling&nbsp;is both ironic and sad.&nbsp; 10,000 apologizes for that, we&#8217;ll fix it in the next release.&nbsp; In the mean time, it&#8217;s Don Jones amd Jeffery Hicks to the rescue.&nbsp; Don and [&hellip;]<\/p>\n","protected":false},"author":600,"featured_media":13641,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[27,30],"class_list":["post-8981","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-powershell","tag-documentation","tag-error"],"acf":[],"blog_post_summary":"<p>We pride ourselves about being a bit overboard when it comes to Error handling.&nbsp; That is why&nbsp;our sparse (non-existing?) documentation of THROW and TRAP handling&nbsp;is both ironic and sad.&nbsp; 10,000 apologizes for that, we&#8217;ll fix it in the next release.&nbsp; In the mean time, it&#8217;s Don Jones amd Jeffery Hicks to the rescue.&nbsp; Don and [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts\/8981","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/users\/600"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/comments?post=8981"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts\/8981\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/media\/13641"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/media?parent=8981"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/categories?post=8981"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/tags?post=8981"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}