Add type / value to MDImporterMissingConcordance

This commit is contained in:
2025-11-11 13:27:27 +01:00
parent 21c25ff3f3
commit 36803da776
24 changed files with 335 additions and 26 deletions

View File

@@ -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.
*