web/lib/Zend/Config/Json.php
changeset 1230 68c69c656a2c
parent 807 877f952ae2bd
equal deleted inserted replaced
1229:5a6b6e770365 1230:68c69c656a2c
    14  *
    14  *
    15  * @category  Zend
    15  * @category  Zend
    16  * @package   Zend_Config
    16  * @package   Zend_Config
    17  * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
    17  * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
    18  * @license   http://framework.zend.com/license/new-bsd     New BSD License
    18  * @license   http://framework.zend.com/license/new-bsd     New BSD License
    19  * @version   $Id: Json.php 24810 2012-05-17 21:20:12Z rob $
    19  * @version   $Id$
    20  */
    20  */
    21 
    21 
    22 /**
    22 /**
    23  * @see Zend_Config
    23  * @see Zend_Config
    24  */
    24  */
   126         if (!$this->_ignoreConstants) {
   126         if (!$this->_ignoreConstants) {
   127             $json = $this->_replaceConstants($json);
   127             $json = $this->_replaceConstants($json);
   128         }
   128         }
   129 
   129 
   130         // Parse/decode
   130         // Parse/decode
   131         $config = Zend_Json::decode($json);
   131         try {
   132 
   132             $config = Zend_Json::decode($json);
   133         if (null === $config) {
   133         } catch (Zend_Json_Exception $e) {
   134             // decode failed
   134             // decode failed
   135             require_once 'Zend/Config/Exception.php';
   135             require_once 'Zend/Config/Exception.php';
   136             throw new Zend_Config_Exception("Error parsing JSON data");
   136             throw new Zend_Config_Exception("Error parsing JSON data");
   137         }
   137         }
   138 
   138