Saying that the exception handler shouldn't have called resume in
the case where the exception was originally thrown in a deeper stack
frame sounds good until you consider that this requires exception
handlers to know whether the code preceding them has been refactored
or not, which makes it tough
2012/6/20 Michael Morris dmgx.mich...@gmail.com
[/snip]
An example for additional clarity.
set_exception_handler(function ($e) {
echo $e-getMessage();
// Don't know if this is correct - but should be able to illustrate here
if ($e-getCode() == E_NOTICE E_STRICT) {
resume null;
}
On Thu, Jun 21, 2012 at 2:59 AM, Sebastian Krebs
krebs@googlemail.com wrote:
2012/6/20 Michael Morris dmgx.mich...@gmail.com
[/snip]
An example for additional clarity.
set_exception_handler(function ($e) {
echo $e-getMessage();
// Don't know if this is correct - but should be able
I can't get this out of my head after two weeks, but some part of me
says this is a *really* bad idea. Of course another part of my brain
things its a great idea and I'm getting tired of the argument.
Resume is similar to return, but can only be used in catch blocks or
in error handling
Resume is similar to return, but can only be used in catch blocks or
in error handling functions. When encountered the run time returns to
the line after the exception was initially thrown and, well,
resumes.
Interesting idea. Just by reading that I thought of this scenario instead: