diff options
| author | 2013-11-19 12:04:56 +0100 | |
|---|---|---|
| committer | 2013-11-19 13:17:08 +0100 | |
| commit | cebf1d9fd9e8479dac300e2fad5ba1c41927b850 (patch) | |
| tree | f6066ca4b2c6811c11bbc815d16dae13e6a7166c /lib | |
| parent | a80a39e975c673c6466f1eb3580e3107401d1eeb (diff) | |
Message d'erreur si fichier conf innaccessible
Voir #282
Diffstat (limited to 'lib')
| -rwxr-xr-x | lib/minz/dao/Model_txt.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/minz/dao/Model_txt.php b/lib/minz/dao/Model_txt.php index c9d5cfe77..aed653068 100755 --- a/lib/minz/dao/Model_txt.php +++ b/lib/minz/dao/Model_txt.php @@ -27,10 +27,17 @@ class Model_txt { */ public function __construct ($nameFile, $mode = 'a+') { $this->filename = $nameFile; + if (!file_exists($this->filename)) { + throw new FileNotExistException ( + $this->filename, + MinzException::WARNING + ); + } + $this->file = @fopen ($this->filename, $mode); if (!$this->file) { - throw new FileNotExistException ( + throw new PermissionDeniedException ( $this->filename, MinzException::WARNING ); |
