posted 4 years ago
I am working on a framework/library that simplifies coding for non-experts.
I am basically wrapping up lots of "driver" code as a fluent interface DSL, such as:
However, in my work, I call lots of methods that require exception handling:
The end result is that, while the "user" (in this case, a lightweight developer) expects "neat" code, every method they use from the DSL requires about a dozen of:
Which needs to be imported and "thrown" in each method definition, losing a lot of code readability.
I am pretty happy with my exception handling as it is. It's a nice mix of preventing damage to the data but also allowing some benign problems to carry on, with an
informative warning in the end.
Just wondering how to move it out of the class where people will code using my DSL, keeping it in the more-technical classes.
Any tiny code example or google suggestions appreciated!
Diagnosed with autism. Please excuse me if I miscommunicated anything.