Add new exception to be thrown when parsing CSV files fails

This commit is contained in:
Joshua Ramon Enslin 2023-07-22 14:23:16 +02:00
parent f281f9b293
commit cc0cf5b923
Signed by: jrenslin
GPG Key ID: 46016F84501B70AE

View File

@ -0,0 +1,19 @@
<?PHP
declare(strict_types = 1);
/**
* Exception to be thrown if parsing a CSV file is impossible (usually errors in
* trying to get table headings).
*/
final class MDInvalidCsv extends Exception {
/**
* Error message.
*
* @return string
*/
public function errorMessage() {
//error message
return 'Invalid input CSV: ' . $e->getMessage();
}
}