By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,569 Members | 1,350 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,569 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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.