Skip to content

Commit

Permalink
reduced clutter
Browse files Browse the repository at this point in the history
  • Loading branch information
nickgerrets committed Jul 29, 2024
1 parent f4dd1e6 commit 240df41
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/main/db_instance_cache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,8 @@ shared_ptr<DuckDB> DBInstanceCache::GetInstanceInternal(const string &database,
}
// the database instance exists - check that the config matches
if (db_instance->instance->config != config) {

string differences = config.GetOptionDifference(db_instance->instance->config);

string diff_message = "Can't open a connection to same database file with a different configuration "
"than existing connections:\n" + differences;


throw duckdb::ConnectionException(diff_message);
throw duckdb::ConnectionException("Can't open a connection to same database file with a different configuration "
"than existing connections:\n" + config.GetOptionDifference(db_instance->instance->config));
}
return db_instance;
}
Expand Down

0 comments on commit 240df41

Please sign in to comment.