diff --git a/app/code/core/Mage/Adminhtml/controllers/Cms/Wysiwyg/ImagesController.php b/app/code/core/Mage/Adminhtml/controllers/Cms/Wysiwyg/ImagesController.php index 8dfcd74e4e3..b987ad16832 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Cms/Wysiwyg/ImagesController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Cms/Wysiwyg/ImagesController.php @@ -75,11 +75,7 @@ public function contentsAction() $this->loadLayout('empty'); $this->renderLayout(); } catch (Exception $e) { - if (Mage::getIsDeveloperMode()) { - $result = ['error' => true, 'message' => $e->getMessage() . ' in ' . $e->getFile() . ' on line ' . $e->getLine()]; - } else { - $result = ['error' => true, 'message' => $e->getMessage()]; - } + $result = ['error' => true, 'message' => $e->getMessage()]; $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result)); } } @@ -92,11 +88,7 @@ public function newFolderAction() $path = $this->getStorage()->getSession()->getCurrentPath(); $result = $this->getStorage()->createDirectory($name, $path); } catch (Exception $e) { - if (Mage::getIsDeveloperMode()) { - $result = ['error' => true, 'message' => $e->getMessage() . ' in ' . $e->getFile() . ' on line ' . $e->getLine()]; - } else { - $result = ['error' => true, 'message' => $e->getMessage()]; - } + $result = ['error' => true, 'message' => $e->getMessage()]; } $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result)); } @@ -107,11 +99,7 @@ public function deleteFolderAction() $path = $this->getStorage()->getSession()->getCurrentPath(); $this->getStorage()->deleteDirectory($path); } catch (Exception $e) { - if (Mage::getIsDeveloperMode()) { - $result = ['error' => true, 'message' => $e->getMessage() . ' in ' . $e->getFile() . ' on line ' . $e->getLine()]; - } else { - $result = ['error' => true, 'message' => $e->getMessage()]; - } + $result = ['error' => true, 'message' => $e->getMessage()]; $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result)); } } @@ -140,11 +128,7 @@ public function deleteFilesAction() } } } catch (Exception $e) { - if (Mage::getIsDeveloperMode()) { - $result = ['error' => true, 'message' => $e->getMessage() . ' in ' . $e->getFile() . ' on line ' . $e->getLine()]; - } else { - $result = ['error' => true, 'message' => $e->getMessage()]; - } + $result = ['error' => true, 'message' => $e->getMessage()]; $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result)); } } @@ -160,11 +144,7 @@ public function uploadAction() $targetPath = $this->getStorage()->getSession()->getCurrentPath(); $result = $this->getStorage()->uploadFile($targetPath, $this->getRequest()->getParam('type')); } catch (Exception $e) { - if (Mage::getIsDeveloperMode()) { - $result = ['errorcode' => $e->getCode(), 'error' => $e->getMessage() . ' in ' . $e->getFile() . ' on line ' . $e->getLine()]; - } else { - $result = ['errorcode' => $e->getCode(), 'error' => $e->getMessage()]; - } + $result = ['error' => true, 'message' => $e->getMessage()]; } $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result)); } diff --git a/app/code/core/Mage/Adminhtml/controllers/System/ConfigController.php b/app/code/core/Mage/Adminhtml/controllers/System/ConfigController.php index f303ecbf45a..b449204c57e 100644 --- a/app/code/core/Mage/Adminhtml/controllers/System/ConfigController.php +++ b/app/code/core/Mage/Adminhtml/controllers/System/ConfigController.php @@ -191,7 +191,8 @@ public function saveAction() } catch (Exception $e) { $session->addException( $e, - Mage::helper('adminhtml')->__('An error occurred while saving this configuration:') . ' ' . (Mage::getIsDeveloperMode() ? $e->getMessage() . ' in ' . $e->getFile() . ' on line ' . $e->getLine() : $e->getMessage()) + Mage::helper('adminhtml')->__('An error occurred while saving this configuration:') . ' ' + . $e->getMessage() ); } diff --git a/app/code/core/Mage/Core/Model/Layout/Validator.php b/app/code/core/Mage/Core/Model/Layout/Validator.php index 32e6a764079..83186ca738e 100644 --- a/app/code/core/Mage/Core/Model/Layout/Validator.php +++ b/app/code/core/Mage/Core/Model/Layout/Validator.php @@ -143,9 +143,6 @@ public function isValid($value) try { $value = new Varien_Simplexml_Element('' . $value . ''); } catch (Exception $e) { - if (Mage::getIsDeveloperMode()) { - throw new Exception($e->getMessage() . ' in ' . $e->getFile() . ' on line ' . $e->getLine()); - } $this->_error(self::XML_INVALID); return false; } @@ -161,9 +158,6 @@ public function isValid($value) try { $this->validateTemplatePath($templatePaths); } catch (Exception $e) { - if (Mage::getIsDeveloperMode()) { - throw new Exception($e->getMessage() . ' in ' . $e->getFile() . ' on line ' . $e->getLine()); - } $this->_error(self::INVALID_TEMPLATE_PATH); return false; }