ScriptingErrorEventArgs Class
SQL Server 2008
The ScriptingErrorEventArgs object provides programmatic access to the arguments used to report the errors that occur during scripting operations.
Assembly: Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)