improved error reporting

This commit is contained in:
2021-06-21 23:33:02 +02:00
parent 95468c609d
commit 562ff50bb0
3 changed files with 92 additions and 44 deletions

View File

@ -24,4 +24,26 @@ final class CSVXMLValidator
$inv_errors = [];
$depcon_errors = [];
}
public function addError(String $error)
{
$this->error_msgs[] = $error;
}
public function addInvError(String $error)
{
$this->inv_errors[] = $error;
}
public function addDepconError(String $error)
{
$this->depcon_errors[] = $error;
}
public function overallErrorCount(): int
{
return count($this->error_msgs)
+ count($this->inv_errors)
+ count($this->depcon_errors);
}
}