You are here: / home / 2008 / 08 / 29

Fri, 29 Aug 2008

How to code... not!

The other day I had the "pleasure" to debug some PHP code. It always showed the very useful error message Database Error.

As it turned out, this error message is printed out at over 38 (!) different places of the PHP script I had to debug. It also included several other PHP scripts, which printed the very same error message.

Please, if you are to lazy to print useful error messages, at least make them unique, so the poor soul who got the task to debug your stuff knows more or less where the error happens. Even numbering all your Database Errors would have helped a bit...

postet at 16:39 into [Debian] permanent link


About

Alexander Tolimar Reichle-Schmehl lives in Tuttlingen / Germany. He works as IT manager (specialized on Unix and SAN/Storage) for an international automotive supplier.

Links