- (database-name-from-spec
- (sql-error-connection-spec c)
- (sql-error-database-type c))
+ (when (and (sql-error-connection-spec c)
+ (sql-error-database-type c))
+ (database-name-from-spec
+ (sql-error-connection-spec c)
+ (sql-error-database-type c)))