When I have to fix other people's code, the first thing I do is comment out the On error resume next line, or replace it with some nice error handling code:
example:
On Error Goto ErrHdlr
'main code of routine
End
ErrHdlr:
' Put in some general error handling routines if necessary
If err=PossibelErrNo ' directory does not exist
' do something
else ' no specific error founc so do default action
r=messagebox "Err:" & Err & " " & Error$ & " l: " & erl & " in " & CurFun & " - Try & continue?", 36, "Error"
if r= 6 then ' user pressed yes
resume next
else ' user wants to stop
print "Error " & Err & " " & Error$ & " at line " & erl & " in function " & CurrentFunction
end
end if ' what did user press
end if ' error check
In Web agents you can change use the error handlers to actually stick out useful information which could help debug the code.
Stick the technical information as comments if you do not want to confuse the user.
eg:
print "An error has occurred.<br>"
print "<!-- Error line: " & erl & " -->"
NB If you see any on error resumes in my code, let me know I will remove them ASAP.