I shutdown database during my code test and got: InterfaceError: network error on read
Maybe it is more correct to raise one of these:
OperationalError
Exception raised for errors that are related to the database's operation and not necessarily under the control of the programmer, e.g. an unexpected disconnect occurs, the data source name is not found, a transaction could not be processed, a memory allocation error occurred during processing, etc. It must be a subclass of DatabaseError.
DatabaseError
Exception raised for errors that are related to the database. It must be a subclass of Error.
I shutdown database during my code test and got:
InterfaceError: network error on read
Maybe it is more correct to raise one of these:OperationalError Exception raised for errors that are related to the database's operation and not necessarily under the control of the programmer, e.g. an unexpected disconnect occurs, the data source name is not found, a transaction could not be processed, a memory allocation error occurred during processing, etc. It must be a subclass of DatabaseError.
DatabaseError Exception raised for errors that are related to the database. It must be a subclass of Error.