File tree Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -172,7 +172,8 @@ protected function prepareData($data)
172172 *
173173 * @param object $data IDS_Report
174174 *
175- * @throws Exception if the logfile isn't writeable
175+ * @throws Exception if the logfile isn't writeable
176+ * @throws InvalidArgumentException if the logfile doesn't exist
176177 * @return boolean
177178 */
178179 public function execute (Report $ data )
@@ -198,17 +199,17 @@ public function execute(Report $data)
198199
199200 } else {
200201 throw new \Exception (
201- 'Please make sure that ' . $ this ->logfile .
202- ' is writeable. '
203- );
202+ 'Please make sure that ' . $ this ->logfile .
203+ ' is writeable. '
204+ );
204205 }
205206 }
206- } else {
207- throw new \Exception (
208- 'Given file does not exist. Please make sure the
209- logfile is present in the given directory. '
210- );
211207 }
208+
209+ throw new \InvalidArgumentException (
210+ sprintf ('Given file %s does not exist. Please make sure the logfile is present in the given directory. ' ,
211+ $ this ->logfile )
212+ );
212213 } else {
213214 throw new \Exception (
214215 'Please make sure that data returned by
You can’t perform that action at this time.
0 commit comments