This code shows an ScriptTask, which is used as an global ErrorHandler in an SSiS Task. It could be used also in Parent-Child architectures, where Tasks will be called by a Main Task. The ErrorHandling will be controlled by several variables, which Logging
LOG_Error As Integer = &H1 LOG_Warning As Integer = &H2 LOG_Info As Integer = &H4 LOG_Verbose As Integer = &H8 LOG_MsgBox As Integer = &H10 LOG_UserVars As Integer = &H100 LOG_SysVars As Integer = &H200 Used Variables
In a two level process (ParentChild), there is no need to set the ErrorLevel variable! But in more deep processes, we control via this variable the behavior of the error catching mechanism from bottom to top. So if we would have a 3 level architecture, and in the bottom task was an error, this would get the CatchLevel = 1. In the middle task the variable would be CatchLevel = 2 and in to top most level, this would be catchLevel = 3 Properties