Closed Jaymon closed 1 year ago
This is a little more difficult than I thought it would be at first. It looks like right now the best solution will be to modify Interface.raise_error()
to take in an exception class, so when Interface.connection()
calls .raise_error()
it could pass in an exception class that raise_error should use when it wraps the error.
Right now everything just gets raised as an
InterfaceError
, but this should be broken down even more, so there should beIntegrityError
andConnectionError
etc. all children ofInterfaceError
, this way we can normalize the errors between all interfaces and yet be able to pick and choose what we want to catch because right now if you just want to ignore an integrity error you have to catch all the errors which is pretty bad, because the code might silently ignore a more serious error