'Twas brillig, and gllop at 27/02/09 10:07 did gyre and gimble:
I'm trying to thow a Zend_Controller_Action_Exception to dispatch a 404 page
error. The ErrorController and the Plugin_Handler instance are already
implemented but I don't know how can i exactly dispatch the exception. I
supose it will be something like:
throw new Zend_Controller_Action_Exception('Error exception');
But this don't render my corresponent 404 page. I get only "Error exception"
message.
Any help would be apreciated. Thx!
Not sure if it's the right approach but I have a nonfound action in my
default module's error controller.
I _forward to this from indexAction if I don't handle the error in some
other way.
In some cases I also specifically forward to this action.
public function notfoundAction()
{
$this->getResponse()->setRawHeader('HTTP/1.1 404 Not Found');
$this->getResponse()->appendBody('<p>Not found</p>');
}
There are probably more elegant ways to get the same result tho'.
Col
--
Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/
Day Job:
Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
Mandriva Linux Contributor [http://www.mandriva.com/]
PulseAudio Hacker [http://www.pulseaudio.org/]
Trac Hacker [http://trac.edgewall.org/]