The solution for me was to tell the EtlProcess
to execute in single-threaded mode.
By default, each Rhino ETL operation is executed on a separate worker thread, which means any exceptions raised by individual operations are swallowed by default. (The queued worker threads wait in series for each other's data to come through - at least, that is what I got from a quick bit of debugging of the source)
To make an EtlProcess
execute in single-threaded mode, just add this to its constructor:
PipelineExecuter = new SingleThreadedPipelineExecuter();
Throwing an exception inside any of the process's operations will then cause the entire process to bomb out. You can record errors at the end of the process by overriding PostProcessing()
:
protected override void PostProcessing()
{
base.PostProcessing();
if (!PipelineExecuter.HasErrors)
Info("Process completed successfully");
else
Warn("Process failed");
}