I had to implement this today…
http://colinkirkby.blogspot.com/2007/01/ssis-creating-error-output-from-script.html
I have a script component in SSIS that could have exceptions that need to be handled gracefully, row-by-row, and logged as such. This blog post contained all I needed!