Created
March 7, 2016 14:10
-
-
Save stefanorg/b8ffaee7c2a395caab45 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class InvalidRowException extends \Exception | |
{ | |
// One off error messages can use this method... | |
public static function create(Row $row, $reason) | |
{ | |
return new static("Row " . $row->getIndex() . " is invalid because: " . $reason); | |
} | |
// ...and predefined methods can use it internally. | |
public static function blankLine(Row $row) | |
{ | |
return static::create($row, "Is a blank line."); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment