ajtsystems
IS-IT--Management
Hi, My error handling doesn't seem to be working:
sub backup (arrmem, backupdir)
err.clear
on error resume next
set objShell = CreateObject("shell.application")
set Shellfolder = objShell.NameSpace(backupdir)
shellfolder.CopyHere (arrmem), 272
if Err.number = 0 then
'happy days
else
' An exception occurred
strErrEvent = Request.ServerVariables("PATH_INFO") & vbTab & _
Err.Number & vbTab & Err.Description
WriteLog errorlogpath, strErrEvent, now
err.clear
End If
Even when I pull the network cable from the server where the files are being copied it doesn't log. I found this site where it shows a for each statement, iff error = 0 do something.
I cannot seem to get mine to work and wonder if i need a for each statement but as I am only copying 1 folder I cannot do it.
Anyhelp would be good
sub backup (arrmem, backupdir)
err.clear
on error resume next
set objShell = CreateObject("shell.application")
set Shellfolder = objShell.NameSpace(backupdir)
shellfolder.CopyHere (arrmem), 272
if Err.number = 0 then
'happy days
else
' An exception occurred
strErrEvent = Request.ServerVariables("PATH_INFO") & vbTab & _
Err.Number & vbTab & Err.Description
WriteLog errorlogpath, strErrEvent, now
err.clear
End If
Even when I pull the network cable from the server where the files are being copied it doesn't log. I found this site where it shows a for each statement, iff error = 0 do something.
I cannot seem to get mine to work and wonder if i need a for each statement but as I am only copying 1 folder I cannot do it.
Anyhelp would be good