Handling Errors during Transformation

  • Hi All,

    Could you please let me know if i can get an error description during the

    Activex script transformation task.Is there any error object that i can

    make use of

     

    Thanks

    Suresh

  • I'm presuming you have an ActiveXScript task like

    Function Main()

      DestinationColum("Col001") = Source("Col001")

    etc...

    If you put the On Error Resume Next statement before the line you want to capture error information for, then you can get error information via the VBScript Err object.

    Once you've caught the error, you should also turn off the error handling using On Error Goto 0

    Generally what I have is something like the following,

    On Error Resume Next
    ' my VBScript statement that might error
    iErrNum = Err.Number 
    iErrDesc = Err.Description
    On Error Goto 0
    
    If iErrNum <> 0 Then
        ' my error handling reporting bits
    End If

     

    --------------------
    Colt 45 - the original point and click interface

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply