Turn off error trapping

cstangor

Member
Licensed User
Longtime User
Can I stop the error boxes from appearing in my production app? I don't have many errors :) but some do show up.

Thanks
 

mc73

Well-Known Member
Licensed User
Longtime User
Wouldn't it be more appropriate to find these errors and fix them? :)
Anyway, in case you know the err areas, you can always use try...catch blocks in order to proceed without errors showing.
 
Upvote 0

cstangor

Member
Licensed User
Longtime User
OK, sure, but what if my host changes something and I haven't prepared for the change? I don't want my users to see the error.

Visual Basic provides a global error trapping routine which is very useful to me.

Is there no option than to give every sub a try...catch?

Thanks
 
Upvote 0

mc73

Well-Known Member
Licensed User
Longtime User
OK, sure, but what if my host changes something and I haven't prepared for the change?
Then, you should try perhaps checking your host's status in one single sub and thus avoid remainig subs if things changed drastically :)
 
Upvote 0

Peter Simpson

Expert
Licensed User
Longtime User
You should always try to use try/catch even in VB. On error goto next is just a lazy way out.

By the way, MC73 is 100% correct.

Sent from my Galaxy Nexus using Tapatalk 2
 
Upvote 0

cstangor

Member
Licensed User
Longtime User
OK, thanks everyone.

I still think a nice feature request would be to have a global error trapping routine, similar to VBs MyApplication_UnhandledException
 
Upvote 0
Top