[Solar-talk] Missing output from a thrown exception

Jeff Surgeson solar at 3hex.com
Tue Apr 29 01:07:20 CDT 2008


> > Can somebody give me a bit of hand with this problem I'm having.
> > Exceptions thrown in any of my page controllers do not output anything to
> > the browser. So, I've set up a really simple application to cut away as
> > much as possible of my code and see what could be causing this. This is
> > what I managed to work out so far....

> > As you can see, I'm deliberately triggering off a _notFound event when
> > accessing the above index.php with no further parameters. I'm expecting
> > to see a message in my browser informing me of the thrown exception.
> > Instead I just get a blank page. I know that
> > Solar_Controller_Page::_notFound() is triggered because I can see the
> > output of "throw $this->_exception()" using var_dump() but where does it
> > go after that?? I'm guessing
> > Solar_Exception->__toString() is suppose to get triggered eventually ...
> > but how?? Where??

I might be missing the point here but I think as you are extending 
Solar_Controller_Page and not Base you need to override the default _notFound 
() method in your Base class and forward to a error.php view to see the 
error/exception.

See the following methods in Solar_App_Base

actionError()
_error($locale_key)
_notFound($action, $params)
_exceptionDuringFetch(Exception $e)

and error.php and exception.php view in Solar_App_Base_View

-- 
...........::::::...........
Jeff Surgeson / South Africa


More information about the Solar-talk mailing list