If you use an error output then you will find that you get given an error number and an error column (i.e. the column in which the error occurred) but you do not get an error description. Well not to worry because youo can get the error description using a script component.
Here I've built a data-flow that contains an error in the source data.
It is expecting integers in the source but in one row there is a string - hence the error. Here's the source file:
So as I said, you can get the error using a script component. You can see this script component in the screenshot above - I've called it "Get Error Description". Its a synchronous component and the first thing you will need to do is add a column to the output that is going to contain the error description.
Here's the code from that script component:
Public Class ScriptMain
Public Overrides Sub Input0_ProcessInputRow(ByVal Row As Input0Buffer)
'Use the incoming error number as a parameter to GetErrorDescription
Row.ErrorDescription = ComponentMetaData.GetErrorDescription(Row.ErrorCode)
As you can see it just takes a simple line of code to get the error description. The ComponentMetadata object exposes many methods, including GetErrorDescription(), that can be useful to you in the script component so its worth spending time getting to know what it provides.
If you want to see this working without bothering to build it you can download the package from here: http://blogs.conchango.com/Admin/ImageGallery/blogs.conchango.com/jamie.thomson/20050808GetErrorDescription.zip I've included the source file as well which you should place into the root of your C: drive..
Thanks go to Doug Laudenshlager for making me aware of this!