diff --git a/database/migrations/2021_03_21_225444_migrate_departaimants.php b/database/migrations/2021_03_21_225444_migrate_departaimants.php index 62d201bb..de944c74 100644 --- a/database/migrations/2021_03_21_225444_migrate_departaimants.php +++ b/database/migrations/2021_03_21_225444_migrate_departaimants.php @@ -97,7 +97,11 @@ class MigrateDepartaimants extends LeGaulois2016Migration $depValue = $oldDpCache[$dept->dId]->dept_code; $depValue = ($depValue == '971' || $depValue == '972') ? DepartaimantVintage::guadeloupeMartinique()->value : $depValue; - $departaimant = DepartaimantVintage::make($depValue); + try { + $departaimant = DepartaimantVintage::make($depValue); + } catch (BadMethodCallException $e) { + dump(sprintf('Unkonwn value %s for collection vintage', $depValue)); + } break; default: throw new Exception(sprintf(