Hi,
I write a module and want to "save" errors to an errorhandler. After response of the function I want to have a look on the error and decide what to do.
E.G.:
module.ascx.vb
returnvalue = moduleController.Function1(...)
moduleController.Function1:
returnvalue =DataProvider.Function1(...)
DataProvider.Function1:
mustoverride function1 .....
sqlDataProvider.Function1 ' something like
try
returnvalue= sqlHelper.execute........
catch ex as exception
returnvalue= -1
'<---- Errorhandling here, something like
'<---- LastExec = ex
'<---- Dim Object as new ErrorEvent(ex)
'<---- RaiseEvent Onerror (me, object)
end try
Return=returnvalue
Now if in sqlDataProvider will be an error (e.g. wrong parameter for stored procedure) I want something like the red above written to a public error handler from dnn and after beeing back in module.ascx.vb I get the returnvalue "-1" from the function to notice "something had gone wrong". Now I want to catch the error itself.
The problem is I can't find a possibility in DNN to do this. IF I use something like "ProcessModuleLoadException" DNN itself handles the error. It is of course possible to write for each module an error handler, but I have to write about a dozend modules, so I want something GENERALLY. On the other hand I don't want to change DNN itself because I want to make updates in DNN possible. So has someone found such a error handler existing in DNN I need?
Thanks a lot
Christian