Re: Unable to capture error - WeOnlyDo Discussion board

Re: Unable to capture error (General questions)

by hit_arc, Tuesday, March 25, 2008, 05:48 (6087 days ago) @ wodDamir

Hi,

Well i am running with blocking = true with PutFiles method And i have used done_event also in the following manner but even this event is not getting triggered i am writing my sample code for better understanding

I have applied a break point on sftp_doneevent but that is not getting fired.

--Done Event
Private Sub Sftp_DoneEvent(ByVal Sender As Object, ByVal Args As WeOnlyDo.Client.SFTP.DoneArgs) Handles Sftp.DoneEvent
If (Args.Error Is Nothing) Then
errorLog = errorLog + Successfully Done
Else
errorLog = errorLog + Args.Error.Message()
End If
End Sub


--Loop Item Event
Private Sub Sftp_LoopItemEvent(ByVal Sender As Object, ByVal Args As WeOnlyDo.Client.SFTP.LoopArgs) Handles Sftp.LoopItemEvent
If ((Args.RemoteFile Is Nothing) Or (Args.LocalFile Is Nothing)) Then
Args.Skip = True
Else
If (processType = Get ) Then
Args.Skip = False
fileLog += Args.RemoteFile.ToString() + ,
ElseIf (processType = Put ) Then
Args.Skip = False
fileLog += Args.LocalFile.ToString() + ,
End If
End If
End Sub


processType is another variables i am setting before calling getfiles or putfiles.

While debugging the debugger is lost after End Sub of loop_itemevent is called for that particular file.

--PutFiles
Sftp.PutFiles(LocalDir, RemoteDir, maxLevel)

LocalDir, RemoteDir, maxLevel are string,string,integer variables resp.


Can anyone help me whats wrong with this code why the done_event is not getting fired in case of error. Like no permissions are assigned to one of the file on my local directory which i am moving to remote server using PutFiles.

Thanks & Regards
Archit agg [color=#abcdef]Text[/color] [color=#abcdef]Text[/color]


Complete thread: