Reverted part of changes #4188

This commit is contained in:
Alexey Milovidov 2019-01-30 16:57:44 +03:00
parent 9b75767135
commit 2eb861c143

View File

@ -22,7 +22,6 @@ namespace ErrorCodes
extern const int STD_EXCEPTION;
extern const int UNKNOWN_EXCEPTION;
extern const int CANNOT_TRUNCATE_FILE;
extern const int LOGICAL_ERROR;
}
@ -78,10 +77,6 @@ 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)
@ -134,10 +129,6 @@ 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)