public function TestMigrateExecutable::handleException in Drupal 10
Same name and namespace in other branches
- 8 core/modules/migrate/tests/src/Unit/TestMigrateExecutable.php \Drupal\Tests\migrate\Unit\TestMigrateExecutable::handleException()
- 9 core/modules/migrate/tests/src/Unit/TestMigrateExecutable.php \Drupal\Tests\migrate\Unit\TestMigrateExecutable::handleException()
Takes an Exception object and both saves and displays it.
Pulls in additional information on the location triggering the exception.
Parameters
\Exception $exception: Object representing the exception.
bool $save: (optional) Whether to save the message in the migration's mapping table. Set to FALSE in contexts where this doesn't make sense.
Overrides MigrateExecutable::handleException
File
- core/
modules/ migrate/ tests/ src/ Unit/ TestMigrateExecutable.php, line 61
Class
- TestMigrateExecutable
- Tests MigrateExecutable.
Namespace
Drupal\Tests\migrate\UnitCode
public function handleException(\Exception $exception, $save = TRUE) {
$message = $exception
->getMessage();
if ($save) {
$this
->saveMessage($message);
}
$this->message
->display($message);
}