You are here: Re: How to trigger an error inside a function and make it come from where it was called? « PHP Programming Language « IT news, forums, messages
Re: How to trigger an error inside a function and make it come from where it was called?

Posted by C. (http://symcbean.blogspot.com/) on 01/14/08 13:56

On 14 Jan, 11:08, Bruno Rafael Moreira de Barros
<brunormbar...@gmail.com> wrote:
> I want the trigger_error to say the error came from application.php
> and the line where it came from. I have a custom error handler, so if
> some change on the error handler (or test1(), for that matter) is
> needed, I will gladly do it.
>

These *are* the parameters to the customer error handler.

from http://uk.php.net/manual/en/function.set-error-handler.php

The third parameter is optional, errfile , which contains the
filename that the error was raised in, as a string.
The fourth parameter is optional, errline , which contains the line
number the error was raised at, as an integer.

See also:
http://uk.php.net/debug_backtrace

C.

 

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

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