X-Git-Url: https://dev.renevier.net/?a=blobdiff_plain;f=application%2Fcontrollers%2FErrorController.php;h=f2e1b69c51a22a6c580f476f203d3337f5bdc7dd;hb=1f6105289a49079809c2a4677b561bc82c62db88;hp=28f321bf563c2c317440d327a21d3ad89f5ba91d;hpb=e85f4874bb734d7b84cc2d10955db2065ac4f261;p=syj.git diff --git a/application/controllers/ErrorController.php b/application/controllers/ErrorController.php index 28f321b..f2e1b69 100644 --- a/application/controllers/ErrorController.php +++ b/application/controllers/ErrorController.php @@ -1,5 +1,5 @@ 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