database: Throw exceptions when dead mysql DB handles are used instead of fatals