Skip to content

Commit

Permalink
Bug #17305 No checking to see if a data file exists - bad error handing
Browse files Browse the repository at this point in the history
  • Loading branch information
CloCkWeRX committed May 14, 2012
1 parent dd463d9 commit 288370a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Image/GIS2.php
Expand Up @@ -129,6 +129,11 @@ public function Image_GIS($parameters = array()) {
* @access public
*/
public function addDataFile($dataFile, $color) {
if (!file_exists($dataFile)) {
throw new InvalidArgumentException(
"Data file '%s' does not exist.", $dataFile
);
}
return $this->parser->addDataFile($dataFile, $color);
}

Expand Down

0 comments on commit 288370a

Please sign in to comment.