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

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • R

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

    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::p rintException($ 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

  • R

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

    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::p rintException($ 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

    Comment

    Working...