Reply to Re: How to trigger an error inside a function and make it come from where it was called?

Your name:

Reply:


Posted by flowover on 01/14/08 11:17

http://ca.php.net/manual/en/language.exceptions.php

On Jan 14, 3:08 am, Bruno Rafael Moreira de Barros
<brunormbar...@gmail.com> wrote:
> function test1() {
> trigger_error('My error');
>
> }
>
> application.php
>
> //code...
> test1();
> //code...
>
> 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.
>
> PHP does it, when you call any PHP function and it errors, it says it
> came from the file that called it. In my own functions, it says it
> came from the declaration... which is kind of useless because that is
> what I already know... but when in the application it happened...
> that's what's hard to find out.

[Back to original 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

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