You are here: Re: Exception : an ugly grammer in programming « PHP Programming Language « IT news, forums, messages
Re: Exception : an ugly grammer in programming

Posted by Henk verhoeven on 07/17/07 22:36

Jerry Stuckle wrote:
> Exceptions originally were designed to handle unexpected conditions,
> i.e. connection to a database failed. They really weren't designed to
> replace normal error processing (i.e. userid/password mismatch).
>
> Normal errors are generally handled by the calling routine, but
> unexpected conditions may be handled by the immediate caller - or
> several layers higher. Exceptions give the ability to handle the
> condition as high in the calling hierarchy as you need to, without
> having to pass return codes from each routine in the which has been called.
>
> I still use them in this way, and it works well.
>

I agree. And for errors that should just be debugged a custom error
handler can output a nice walkback (if under development) or log it with
usefull info (if in production).

Greetings,

Henk,
www.phpPeanuts.org.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация