mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-12 02:23:14 +00:00
Better error messages
This commit is contained in:
parent
8054a08c55
commit
84584659b6
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user