469,579 Members | 1,146 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,579 developers. It's quick & easy.

Fatal error: Exception thrown without a stack frame in Unknown on line 0

R
Hi All,

I'm using PHP 5, my code fully separates code from content, my code
throws exceptions (LIZException) when error occurs.

but every time I throw exception I get this fatal error:

Fatal error: Exception thrown without a stack frame in Unknown on line
0

It must be my fault by the message isn't helping me - any idea what to
do?

My code looks like this:
<?
try {
// code goes here
}
catch (LIZException $e) {
$e->printDebug();
echo '@@';
} catch (Exception $e) {
LIZException::printException($e);
}
echo '!!!';

?> // end of file!

If exception thrown:
$e->printDebug() will execute, then echo '@@', then echo '!!!'

and finally fatal error message

any hints most welcome
best regards
R

May 2 '06 #1
1 13622
R
Hi all,

I found the reason - one of my class has __destruct function and was
calling
a method on object that was already destroyed by PHP5.

the solution to my problem was to call Finalize method that closes
all streams, connections, sessions etc - it was called always when
exception wasn't thrown.

so I simply added:

catch (LIZException $e)
{
$e->printDebug();
}
catch (Exception $e)
{
LIZException::printException($e);
}
// PHP5 doesn't have finally block... sux
//finally
//{
if (false == $module->isFinalized())
{
$module->Finalize();
}
//}

I'm missing the finally block very much ;)

best redards
R

May 2 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Barry Mossman | last post: by
2 posts views Thread by Chuck Ritzke | last post: by
3 posts views Thread by tshad | last post: by
2 posts views Thread by tshad | last post: by
reply views Thread by tshad | last post: by
9 posts views Thread by Adem | last post: by
1 post views Thread by scn87 | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.