note 84589 rejected from function.assert by danbrown
| From: | danbrown@php.net | Date: | Mon, 21 Jul 2008 03:55:07 +0000 |
| Subject: | note 84589 rejected from function.assert by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-142403@lists.php.net to get a copy of this message | ||
Note Submitter: hodgman at ali dot com dot au
----
tom russo at gmail dot com said:
"If your production code fails an assert, YOU WANT TO KNOW ABOUT IT. Asserts are a debugging
tool, but you should not stop debugging your code just because it has gone into production."
I agree that you want to know if your code breaks, however, in a production system, assertions are
still the wrong tool for this. Assertions give this valuable debugging information to THE END USER,
not to THE DEVELOPER.
In production, switch over to a logging system and just display a "technical difficulties"
page to the user - don't go handing out the internal workings of your system to your users!