From 240df411ffcf45828de6efb6f0752f8c64a493e1 Mon Sep 17 00:00:00 2001 From: Nick Gerrets Date: Mon, 29 Jul 2024 16:24:53 +0200 Subject: [PATCH] reduced clutter --- src/main/db_instance_cache.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/main/db_instance_cache.cpp b/src/main/db_instance_cache.cpp index 56edb7a9ecef..aa1610524c55 100644 --- a/src/main/db_instance_cache.cpp +++ b/src/main/db_instance_cache.cpp @@ -60,14 +60,8 @@ shared_ptr 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; }