Loading core/modules/migrate/src/MigrateExecutable.php +10 −3 Original line number Diff line number Diff line Loading @@ -189,7 +189,11 @@ public function import() { } catch (\Exception $e) { $this->message->display( $this->t('Migration failed with source plugin exception: @e', ['@e' => $e->getMessage()]), 'error'); $this->t('Migration failed with source plugin exception: @e in @file line @line', [ '@e' => $e->getMessage(), '@file' => $e->getFile(), '@line' => $e->getLine(), ]), 'error'); $this->migration->setStatus(MigrationInterface::STATUS_IDLE); return MigrationInterface::RESULT_FAILED; } Loading Loading @@ -269,8 +273,11 @@ public function import() { } catch (\Exception $e) { $this->message->display( $this->t('Migration failed with source plugin exception: @e', ['@e' => $e->getMessage()]), 'error'); $this->t('Migration failed with source plugin exception: @e in @file line @line', [ '@e' => $e->getMessage(), '@file' => $e->getFile(), '@line' => $e->getLine(), ]), 'error'); $this->migration->setStatus(MigrationInterface::STATUS_IDLE); return MigrationInterface::RESULT_FAILED; } Loading core/modules/migrate/tests/src/Unit/MigrateExecutableTest.php +4 −0 Original line number Diff line number Diff line Loading @@ -66,12 +66,16 @@ public function testImportWithFailingRewind() { $source->expects($this->once()) ->method('rewind') ->will($this->throwException(new \Exception($exception_message))); // The exception message contains the line number where it is thrown. Save // it for the testing the exception message. $line = (__LINE__) - 3; $this->migration->expects($this->any()) ->method('getSourcePlugin') ->will($this->returnValue($source)); // Ensure that a message with the proper message was added. $exception_message .= " in " . __FILE__ . " line $line"; $this->message->expects($this->once()) ->method('display') ->with("Migration failed with source plugin exception: " . Html::escape($exception_message)); Loading Loading
core/modules/migrate/src/MigrateExecutable.php +10 −3 Original line number Diff line number Diff line Loading @@ -189,7 +189,11 @@ public function import() { } catch (\Exception $e) { $this->message->display( $this->t('Migration failed with source plugin exception: @e', ['@e' => $e->getMessage()]), 'error'); $this->t('Migration failed with source plugin exception: @e in @file line @line', [ '@e' => $e->getMessage(), '@file' => $e->getFile(), '@line' => $e->getLine(), ]), 'error'); $this->migration->setStatus(MigrationInterface::STATUS_IDLE); return MigrationInterface::RESULT_FAILED; } Loading Loading @@ -269,8 +273,11 @@ public function import() { } catch (\Exception $e) { $this->message->display( $this->t('Migration failed with source plugin exception: @e', ['@e' => $e->getMessage()]), 'error'); $this->t('Migration failed with source plugin exception: @e in @file line @line', [ '@e' => $e->getMessage(), '@file' => $e->getFile(), '@line' => $e->getLine(), ]), 'error'); $this->migration->setStatus(MigrationInterface::STATUS_IDLE); return MigrationInterface::RESULT_FAILED; } Loading
core/modules/migrate/tests/src/Unit/MigrateExecutableTest.php +4 −0 Original line number Diff line number Diff line Loading @@ -66,12 +66,16 @@ public function testImportWithFailingRewind() { $source->expects($this->once()) ->method('rewind') ->will($this->throwException(new \Exception($exception_message))); // The exception message contains the line number where it is thrown. Save // it for the testing the exception message. $line = (__LINE__) - 3; $this->migration->expects($this->any()) ->method('getSourcePlugin') ->will($this->returnValue($source)); // Ensure that a message with the proper message was added. $exception_message .= " in " . __FILE__ . " line $line"; $this->message->expects($this->once()) ->method('display') ->with("Migration failed with source plugin exception: " . Html::escape($exception_message)); Loading