pyoptsparse
pyoptsparse copied to clipboard
Overhaul the `Error` system
Description of feature
The current setup is not very good---we use the same Error class for all exceptions, which means we cannot catch specific errors. Instead, we must resort to parsing the error message as done in #277. We should probably switch to built-in exceptions for most things, and create specific classes for pyOptSparse-specific errors such as not finding the compiled library. We lose the formatted box, but I don't think that's a big deal.
Potential solution
- switch back to built-in exceptions for most cases, remove the
Errorclass - create specific exception classes as needed for when the built-in exceptions are not sufficient