{"id":94,"date":"2010-06-28T14:41:48","date_gmt":"2010-06-28T19:41:48","guid":{"rendered":"http:\/\/weinshenker.net\/blog\/?p=94"},"modified":"2010-08-21T23:36:14","modified_gmt":"2010-08-22T04:36:14","slug":"is-this-good-coding-practice","status":"publish","type":"post","link":"http:\/\/weinshenker.net\/blog\/2010\/06\/28\/is-this-good-coding-practice\/","title":{"rendered":"Is this good coding practice?"},"content":{"rendered":"<p>A consultant developer just handed me code with the following exception clause.<\/p>\n<p>EXCEPTION<br \/>\n   WHEN NO_DATA_FOUND<br \/>\n   THEN<br \/>\n      RETURN 0;<br \/>\n   WHEN OTHERS<br \/>\n   THEN<br \/>\n      RETURN 0;<br \/>\nEND XXXXXXXXXXX;<\/p>\n<p>Now, I&#8217;m no developer, but what the heck is that point of that mess?  Regardless of what exception comes up, always return the same exception code.  And if that&#8217;s not bad enough, always return 0, meaning everything is OK.<\/p>\n<p>Sigh.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A consultant developer just handed me code with the following exception clause. EXCEPTION WHEN NO_DATA_FOUND THEN RETURN 0; WHEN OTHERS THEN RETURN 0; END XXXXXXXXXXX; Now, I&#8217;m no developer, but what the heck is that point of that mess? Regardless of what exception comes up, always return the same exception code. And if that&#8217;s not &hellip; <a href=\"http:\/\/weinshenker.net\/blog\/2010\/06\/28\/is-this-good-coding-practice\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Is this good coding practice?<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[1],"tags":[27,26,25,10],"_links":{"self":[{"href":"http:\/\/weinshenker.net\/blog\/wp-json\/wp\/v2\/posts\/94"}],"collection":[{"href":"http:\/\/weinshenker.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/weinshenker.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/weinshenker.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/weinshenker.net\/blog\/wp-json\/wp\/v2\/comments?post=94"}],"version-history":[{"count":2,"href":"http:\/\/weinshenker.net\/blog\/wp-json\/wp\/v2\/posts\/94\/revisions"}],"predecessor-version":[{"id":124,"href":"http:\/\/weinshenker.net\/blog\/wp-json\/wp\/v2\/posts\/94\/revisions\/124"}],"wp:attachment":[{"href":"http:\/\/weinshenker.net\/blog\/wp-json\/wp\/v2\/media?parent=94"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/weinshenker.net\/blog\/wp-json\/wp\/v2\/categories?post=94"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/weinshenker.net\/blog\/wp-json\/wp\/v2\/tags?post=94"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}