X-Git-Url: https://dev.renevier.net/?p=syj.git;a=blobdiff_plain;f=application%2Fcontrollers%2FErrorController.php;h=486c24a948aef9138291d49a3ba910f2f5e2bc39;hp=28f321bf563c2c317440d327a21d3ad89f5ba91d;hb=c1aeb7538786d8c9f3b3337c0b71e21ef89d9c77;hpb=69cbaf628f5576754d4553c021315188e22d24af diff --git a/application/controllers/ErrorController.php b/application/controllers/ErrorController.php index 28f321b..486c24a 100644 --- a/application/controllers/ErrorController.php +++ b/application/controllers/ErrorController.php @@ -43,6 +43,11 @@ class ErrorController extends Zend_Controller_Action if ($error_code == 400 and $error->request->isXmlHttpRequest()) { return $this->_helper->json(array('message' => $error->exception->getMessage())); + } else if ($error->exception instanceof Syj_Exception_InvalidGeomUpload) { + // invalid file upload: we will redirect to main page + $this->_helper->SyjReset->resetPlaceHolders(); + $this->_request->setControllerName('idx')->setActionName('error')->setDispatched(false); + return; } // conditionally display exceptions