Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
AndrewHumiston
in reply to: ngnam1988

good morning,

 

I want to caution you on using 'on error' handling.

 

In my experience it is better to solve the issue that is causing the error than to resume when an error has happened.

 

i will share why. the company i work for has a configurable sales CAD system that populates a model with other assemblies that are controlled by turning off/on visibility. I know terrible idea, but its been around for about 10 years, all the code is located in one rule that is approx. 1000 lines long, and uses 'on error; & "goto" syntax. While it seems like a good practice to get the job done, in reality it is 'lazy' coding. When you are the person coming behind code, it is tough to follow those kinds of event handlers. Its taken way to many hours to find the simplest bugs to flush out how it works and why.

 

i hope this helps, please reach out with any questions, I don't pretend to know everything, but I will sure try to answer your question!

 

@AndrewHumiston - this post has been edited due to Community Rules & Etiquette violation.