by MtM Thu Oct 21, 2010 8:01 am
Jedi where you now use log for both normal log messages and for errors, make a seperate sub for logErr
Sub LogErr(Location as string, ErrObj as ErrObject,optional byval ExtraInfo as string= "")
log("error at - " & message )
log(errobject.tostring & " - " & errobj.getexception.stacktrace.tostring)
if extrainfo <> "" then log("Extra info= " & extrainfo)
end sub
Then where you have your try catch end try use logerror on catched exceptions, and since you're using the application framework, go to project properties, click on application events it will open a new code window. Set up an unhandeld exception catcher there as well.
Or.. do it the easy way and include this for instance ->
http://www.codeproject.com/KB/exception/ExceptionHandling.aspxI can't use the application framework, so I think the percentage of code I have to include for error handling is rather large, every property I read which can throw an error I have to catch and handle