Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordiosmosis <benaka@piwik.pro>2014-10-27 08:30:14 +0300
committerdiosmosis <benaka@piwik.pro>2014-10-28 06:46:32 +0300
commit4a6c3b3e3109e2d57076ad62a4bf9f8118ca2bd7 (patch)
treec9b5894be69dbd2b9b1d8265caf7dc6447580f98 /core/Config.php
parentafb1c374f969731bbc7f4e3f0157cc25cce8672e (diff)
Replace all uses of Piwik_ExitWithMessage (except one) with throwing exceptions & include HtmlMessageException class for exceptions w/ HTML content in their message.
Diffstat (limited to 'core/Config.php')
-rw-r--r--core/Config.php9
1 files changed, 4 insertions, 5 deletions
diff --git a/core/Config.php b/core/Config.php
index 7d0e9072e9..95f4e62e6c 100644
--- a/core/Config.php
+++ b/core/Config.php
@@ -314,13 +314,13 @@ class Config extends Singleton
// read defaults from global.ini.php
if (!is_readable($this->pathGlobal) && $reportError) {
- Piwik_ExitWithMessage(Piwik::translate('General_ExceptionConfigurationFileNotFound', array($this->pathGlobal)));
+ throw new Exception(Piwik::translate('General_ExceptionConfigurationFileNotFound', array($this->pathGlobal)));
}
$this->configGlobal = _parse_ini_file($this->pathGlobal, true);
if (empty($this->configGlobal) && $reportError) {
- Piwik_ExitWithMessage(Piwik::translate('General_ExceptionUnreadableFileDisabledMethod', array($this->pathGlobal, "parse_ini_file()")));
+ throw new Exception(Piwik::translate('General_ExceptionUnreadableFileDisabledMethod', array($this->pathGlobal, "parse_ini_file()")));
}
$this->configCommon = _parse_ini_file($this->pathCommon, true);
@@ -330,7 +330,7 @@ class Config extends Singleton
$this->configLocal = _parse_ini_file($this->pathLocal, true);
if (empty($this->configLocal) && $reportError) {
- Piwik_ExitWithMessage(Piwik::translate('General_ExceptionUnreadableFileDisabledMethod', array($this->pathLocal, "parse_ini_file()")));
+ throw new Exception(Piwik::translate('General_ExceptionUnreadableFileDisabledMethod', array($this->pathLocal, "parse_ini_file()")));
}
}
@@ -725,5 +725,4 @@ class Config extends Singleton
}
return $merged;
}
-
-}
+} \ No newline at end of file