complexvariables / conformalmapping

Conformal mapping toolkit for MATLAB
Other
11 stars 9 forks source link

Error and warning tags #55

Open tobydriscoll opened 9 years ago

tobydriscoll commented 9 years ago

See issue #44 as well.

Each error and warning thrown is supposed to have a tag. From a certain point of view, it's the right thing to do. But I've never met a regular user who understands or cares about them.

There could be some value in turning them off internally temporarily to do some things. Is it worth using these tags, or should we consider ignoring them?

ehkropf commented 9 years ago

The error and warning ident strings aren't for mere mortal users. They're really aimed at developers. Since we're building a package that we hope people will expand, it would be nice if we had some internally consistent ident string scheme.

I find these strings handy in try/catch blocks. It helps to be able to identify what type of error just occurred. We don't need to (and shouldn't) turn off errors, as the try/catch block can handle this; known error types can be handled gracefully while unknown (usually runtime) errors can be re-thrown and passed to the system error handler. See conformalmap.apply for an example of an application of this.