Add type / value to MDImporterMissingConcordance
This commit is contained in:
@@ -5,6 +5,28 @@ declare(strict_types = 1);
|
||||
* Exception thrown in case an update failed.
|
||||
*/
|
||||
final class MDImporterMissingConcordance extends Exception {
|
||||
|
||||
public string $target_type;
|
||||
public string $value_to_map;
|
||||
|
||||
/**
|
||||
* Sets up an error.
|
||||
*
|
||||
* @param string $target_type Target type (e.g. "measurements").
|
||||
* @param string $value_to_map Value to map.
|
||||
*
|
||||
* @return MDImporterMissingConcordance
|
||||
*/
|
||||
public static function setup(string $target_type, string $value_to_map):MDImporterMissingConcordance {
|
||||
|
||||
$exception = new MDImporterMissingConcordance("Unmapped specific value of type " . $target_type . ": " . $value_to_map);
|
||||
$exception->target_type = $target_type;
|
||||
$exception->value_to_map = $value_to_map;
|
||||
|
||||
return $exception;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Error message.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user