pyoptsparse icon indicating copy to clipboard operation
pyoptsparse copied to clipboard

Overhaul the `Error` system

Open ewu63 opened this issue 4 years ago • 0 comments

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 Error class
  • create specific exception classes as needed for when the built-in exceptions are not sufficient

ewu63 avatar Dec 22 '21 16:12 ewu63