Better error messages

This commit is contained in:
Alexey Milovidov 2020-08-10 04:06:06 +03:00
parent 8054a08c55
commit 84584659b6

View File

@ -70,8 +70,16 @@ static void loadDatabase(
database_attach_query = "CREATE DATABASE " + backQuoteIfNeed(database);
}
executeCreateQuery(database_attach_query, context, database,
database_metadata_file, force_restore_data);
try
{
executeCreateQuery(database_attach_query, context, database,
database_metadata_file, force_restore_data);
}
catch (Exception & e)
{
e.addMessage(fmt::format("while loading database {} from file {}", backQuote(database), database_path));
throw;
}
}