From dbf96121469b00c070b95095dcae2b1c408581dc Mon Sep 17 00:00:00 2001 From: xue <> Date: Sat, 25 Mar 2006 22:00:48 +0000 Subject: Added more meaningful error message when creating runtime directory fails. --- framework/Exceptions/messages.txt | 1 + framework/TApplication.php | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'framework') diff --git a/framework/Exceptions/messages.txt b/framework/Exceptions/messages.txt index 798fb50a..a60230bd 100644 --- a/framework/Exceptions/messages.txt +++ b/framework/Exceptions/messages.txt @@ -30,6 +30,7 @@ application_service_invalid = Service '{0}' must implement IService interface application_service_unknown = Requested service '{0}' is not defined. application_service_unavailable = Service Unavailable. application_moduleid_duplicated = Application module ID '{0}' is not unique. +application_runtimepath_failed = Unable to create runtime path '{0}'. Make sure the parent directory exists and is writable by the Web process. appconfig_aliaspath_invalid = Application configuration uses an invalid file path "{1}". appconfig_alias_invalid = Application configuration element must have an "id" attribute and a "path" attribute. diff --git a/framework/TApplication.php b/framework/TApplication.php index 12ac7195..681e8f3e 100644 --- a/framework/TApplication.php +++ b/framework/TApplication.php @@ -314,7 +314,8 @@ class TApplication extends TComponent $subdir=basename($this->_configFile); $this->_runtimePath.='/'.$subdir; if(!is_dir($this->_runtimePath)) - mkdir($this->_runtimePath); + if(@mkdir($this->_runtimePath)===false) + throw new TConfigurationException('application_runtimepath_failed',$this->_runtimePath); } } else -- cgit v1.2.3