errors are caught and collected by each operation and the etl process. 
Rhino.ETL does it's best to prevent errors from throwing through as that 
would break the pipeline.

On Wednesday, September 5, 2012 4:13:55 PM UTC-4, oliwa wrote:
>
> I have a simple process that pulls data from one database and is 
> attempting to insert it into another. My process looks likes this...
>
> protected override void Initialize()
> {
>     Register(new ExtractLocationData());
>     Register(new LoadLocationData("ConnectionString", "TableName"));
> }
>
> protected override void OnFinishedProcessing(IOperation op)
> {
>     foreach (var exception in op.GetAllErrors())
>     {
>         throw exception;
>     }
> }
>
> protected override void PostProcessing()
> {
>     foreach (var exception in Errors)
>     {
>         throw exception;
>     }
> } 
>
> Now I am purposely trying to insert a NULL value into a column that is NOT 
> NULL so I can test how to handle the errors.  In my console output I get 
> the error like so...
>
> 9/5/2012 4:06:45 PM [ERROR] 
> Rhino.Etl.Core.Pipelines.ThreadPoolPipelineExecuter - Failed to execute 
> operation 
> LoadLocationData
>
> System.Data.SqlClient.SqlException (0x80131904): Cannot insert the value NULL 
> into column 'Id', table 'Location'; column does not allow nulls. INSERT fails.
> The statement has been terminated.
>
> So I added 2 overrides in an attempt to catch the error and throw it so my 
> process will fail but neither override finds any errors.
>
> It appears as if the SqlBulkInsertOperation class swallows the errors and 
> doesn't add it to the error collection.
>
> Am I missing something?
>
> And on a side note, why would an error bubble up and cause the process to 
> fail?  Having the process fail silently doesn't make any sense at all to me.
>
> Thanks!
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Rhino Tools Dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/rhino-tools-dev/-/cOfMM8bFkBAJ.
To post to this group, send email to rhino-tools-dev@googlegroups.com.
To unsubscribe from this group, send email to 
rhino-tools-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rhino-tools-dev?hl=en.

Reply via email to