- Field error are now all catched as \Throwable
This commit is contained in:
parent
f292ac63ca
commit
78670c2fcf
@ -96,8 +96,9 @@ abstract class Save extends Form implements \Picea\Ui\Method\FormInterface {
|
|||||||
if ($attribute) {
|
if ($attribute) {
|
||||||
try {
|
try {
|
||||||
$attribute->object->assertValueSpecs($context->$name ?? null, ! $this->getEntity()->isLoaded());
|
$attribute->object->assertValueSpecs($context->$name ?? null, ! $this->getEntity()->isLoaded());
|
||||||
} catch (MandatoryFieldException $e) {
|
}
|
||||||
throw new MandatoryFieldException("An error occured with field '$name': " . $e->getMessage());
|
catch(\Throwable $ex) {
|
||||||
|
throw new MandatoryFieldException("An error occured with field '$name': " . $ex->getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user