diff --git a/config.php b/config.php index 142a72a..f1b3ab6 100644 --- a/config.php +++ b/config.php @@ -54,7 +54,7 @@ class config $conf = array (); $rc = include ($this->confFile); if ($rc !== 1) - throw new Exception ("Error in configuration file"); + throw new Exception ("Error in configuration file", 500); return $conf; } @@ -65,7 +65,7 @@ class config { $this->selectConfFile (); if (!array_key_exists ($param, $this->default)) - throw new Exception ("Unknown parameter '$param'"); + throw new Exception ("Unknown parameter '$param'", 500); if (!file_exists ($this->confFile)) { if (@file_put_contents ($this->confFile, @@ -73,7 +73,7 @@ class config === FALSE) throw new Exception (sprintf (dgettext("domframework", "No configuration file '%s' available and it can't be created"), - $this->confFile)); + $this->confFile), 500); } elseif (! is_readable ($this->confFile)) throw new Exception (sprintf ( dgettext("domframework", @@ -82,7 +82,7 @@ class config $conf = array (); $rc = include ($this->confFile); if ($rc !== 1) - throw new Exception ("Error in configuration file"); + throw new Exception ("Error in configuration file", 500); if (array_key_exists ($param, $conf)) { if (! is_array ($conf[$param])) @@ -110,7 +110,7 @@ class config { $this->selectConfFile (); if (!array_key_exists ($param, $this->default)) - throw new Exception ("Unknown parameter '$param'"); + throw new Exception ("Unknown parameter '$param'", 500); if (!file_exists ($this->confFile)) { if (@file_put_contents ($this->confFile, @@ -124,11 +124,11 @@ class config throw new Exception (sprintf ( dgettext("domframework", "The configuration file '%s' is not readable"), - $this->confFile)); + $this->confFile), 500); if (!is_writeable ($this->confFile)) throw new Exception (sprintf (dgettext("domframework", "Configuration file '%s' is write protected"), - $this->confFile)); + $this->confFile), 500); $conf = array (); $rc = include ($this->confFile); if ($rc !== 1) @@ -143,7 +143,7 @@ class config if (@file_put_contents ($this->confFile, $txt, LOCK_EX) === FALSE) throw new Exception (sprintf (dgettext("domframework", "Can't save configuration file '%s'"), - $this->confFile)); + $this->confFile), 500); return TRUE; }