Problem/Motivation
This is a bit of an edge case scenario.
But if the migration that's being stubbed happens to fail with a non-migrate error, the exception may be swallowed by the Lookup process, but the stub is stops functioning for subsequent stubs because it the main stub process never finishes.
Steps to reproduce
* Create a stub migration referencing an invalid process plugin.
* Attempt to stub row referencing that migration.
* The doCreateStub() method fails, but because it's only catching MigrateException related exceptions, it doesn't catch the PluginNotFoundException exception, and leaves MigMagMigrateStub::$mainStubProcessHasStarted as TRUE, and never unsets it.
Proposed resolution
1. Catch generic exceptions as well
2. Reset the MigMagMigrateStub::$mainStubProcessHasStarted to FALSE
3. Rethrow the generic exception so that the caller can handle it.
Remaining tasks
- Provide MR
API changes
No changes.
Comments