a POSSIBLE work round.
see if u can use
http://in2.php.net/manual/en/function.error-get-last.php or
http://in2.php.net/manual/en/reserved.variables.phperrormsg.php but
they are not working as expected with xdebug. use them in the
__destruct function to check for an uncaught exception
alternativel
tialtech.com
> To: an_...@hotmail.com
> CC: php-general@lists.php.net
> Subject: Re: [PHP] How can I detect an exception without using try/catch?
>
> In response to Andrea Giammarchi :
> >
> > http://uk2.php.net/set_exception_handler
> > http://uk2.php.net/manual/e
Ok, the details of the problem obviously aren't being understood.
Let's assume that I explained it poorly and I'll try again. Take the
following code (It's complete, cut/paste to see what happens.):
running = true;
}
public function stop() {
$this->running = false;
}
public function __
2009/4/23 Bill Moran :
>
> Specifically, the __destruct() method of certain objects will be
> called if an object goes out of scope due to an exception. Since
> the __destruct() method didn't call the code that caused the
> exception, it can't catch it.
>
> I need the __destruct() method to behave
>
>
> What would be nice is a function like get_current_exception() that
> would either return the current exception object, or return false
> if there is no exception.
>
> I guess the try catch pair works like this:
you try to run a part of script which you know it could be under errors
You te
In response to Andrea Giammarchi :
>
> http://uk2.php.net/set_exception_handler
> http://uk2.php.net/manual/en/function.set-error-handler.php
Thanks for the reply, Andrea. However, you either didn't read my
entire message, or didn't understand it. I can't use either of
those to detect an except
http://uk2.php.net/set_exception_handler
http://uk2.php.net/manual/en/function.set-error-handler.php
> Date: Thu, 23 Apr 2009 12:19:30 -0400
> From: wmo...@potentialtech.com
> To: php-general@lists.php.net
> Subject: [PHP] How can I detect an exception without using try/catch?
>
>
> Specifical
7 matches
Mail list logo