mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 15:42:02 +00:00
Merge branch 'fix14' of https://github.com/proller/ClickHouse into proller-fix14
This commit is contained in:
commit
9b75767135
@ -22,6 +22,7 @@ namespace ErrorCodes
|
||||
extern const int STD_EXCEPTION;
|
||||
extern const int UNKNOWN_EXCEPTION;
|
||||
extern const int CANNOT_TRUNCATE_FILE;
|
||||
extern const int LOGICAL_ERROR;
|
||||
}
|
||||
|
||||
|
||||
@ -77,6 +78,10 @@ std::string getCurrentExceptionMessage(bool with_stacktrace, bool check_embedded
|
||||
|
||||
try
|
||||
{
|
||||
// Avoid terminate if called outside catch block. Should not happen.
|
||||
if (!std::current_exception())
|
||||
return "No exception.";
|
||||
|
||||
throw;
|
||||
}
|
||||
catch (const Exception & e)
|
||||
@ -129,6 +134,10 @@ int getCurrentExceptionCode()
|
||||
{
|
||||
try
|
||||
{
|
||||
// Avoid terminate if called outside catch block. Should not happen.
|
||||
if (!std::current_exception())
|
||||
return ErrorCodes::LOGICAL_ERROR;
|
||||
|
||||
throw;
|
||||
}
|
||||
catch (const Exception & e)
|
||||
|
@ -222,9 +222,7 @@ void ExternalLoader::reloadAndUpdate(bool throw_on_error)
|
||||
}
|
||||
else
|
||||
{
|
||||
tryLogCurrentException(log, "Cannot update " + object_name + " '" + name + "', leaving old version");
|
||||
if (throw_on_error)
|
||||
throw;
|
||||
tryLogException(exception, log, "Cannot update " + object_name + " '" + name + "', leaving old version");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user