Exception thrown without a stack frame in Unknown on line 0

7 messages Options
Embed this post
Permalink
frankblack () Exception thrown without a stack frame in Unknown on line 0
Reply Threaded More More options
Print post
Permalink
I found several statements about this message, but none was of help to me. The page is plain blank and I found this error only by logging to a file. I do know what is happening or what should happen: the script has to send a mail, but the page dies and I get no debug.

In my despair I removed the exception handler. Is there any solution to my problem?

TIA
frankblack
Christoph Dorn () Re: Exception thrown without a stack frame in Unknown on line 0
Reply Threaded More More options
Print post
Permalink
I have run into this before when the exception handler throws an exception. Are you using the latest version of FirePHPCore (0.3.1)?

You could try wrapping the exception handler code in a try/catch and log the exception to a file. This is the code block that needs to be wrapped: http://code.google.com/p/firephp/source/browse/trunk/FirePHPCore/lib/FirePHPCore/FirePHP.class.php#397

If this works you can send me what is throwing the exception and I can try and work on a fix for the exception handler.
frankblack () Re: Exception thrown without a stack frame in Unknown on line 0
Reply Threaded More More options
Print post
Permalink
Yes, I am using 0.31, but you have to help me a bit, because I belong to the worst species of "programmers": copy'n'paste-programmers.

I know how to write "things" to a file, but the rest ... try/catch/exceptions ... is completely new to me, so I am a bit lost. Sorry! Do I hear you mumbling "amateur"? ;-)
Christoph Dorn () Re: Exception thrown without a stack frame in Unknown on line 0
Reply Threaded More More options
Print post
Permalink
Try replacing the exceptionHandler method with the following code:

  function exceptionHandler($Exception) {
    
    $this->inExceptionHandler = true;

    header('HTTP/1.1 500 Internal Server Error');

    try {
        $this->fb($Exception);
	} catch(Exception $e) {
		echo 'We had an exception: ' . $e;
	}
    $this->inExceptionHandler = false;
  }


If you don't see any output you can log the echo to a file.
frankblack () Re: Exception thrown without a stack frame in Unknown on line 0
Reply Threaded More More options
Print post
Permalink
Thx! I'll try this snippet and report you.
frankblack () Re: Exception thrown without a stack frame in Unknown on line 0
Reply Threaded More More options
Print post
Permalink
Nothing! No echo, nothing written to a file. In fact the function is never called, because at the very start I added some code to write to a file with some text, but the text was never written. The code for writing to a file works. So it must be something else. Maybe my settings?

Here is the start:
require_once '/Frameworks/FirePHPCore/FirePHP.class.php';
$fb = FirePHP::getInstance(true);
$fb->registerErrorHandler(true);
$fb->registerExceptionHandler();
$fb->registerAssertionHandler(true, false);

Something wrong here? BTW path to the class is correct.
frankblack () Re: Exception thrown without a stack frame in Unknown on line 0
Reply Threaded More More options
Print post
Permalink
Oh, dear. All my fault. I changed the code for activating the logger in the CMS I use and now it is working. But what is was in the end, that there was no debug ... ?

Sorry for the inconvenience. :-(