mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 17:12:03 +00:00
Daemon: added stack trace in case of DB::Exception [#CONV-2807].
This commit is contained in:
parent
3bffaff936
commit
11e5fb35ec
@ -27,6 +27,8 @@
|
||||
#include <Poco/ErrorHandler.h>
|
||||
#include <Poco/NumberFormatter.h>
|
||||
|
||||
#include <DB/Core/Exception.h>
|
||||
|
||||
#include "revision.h"
|
||||
|
||||
|
||||
@ -274,6 +276,11 @@ void Daemon::handleNotification(TaskFailedNotification *_tfn)
|
||||
Logger *lg = &(logger());
|
||||
LOG_ERROR(lg, "Task '" << fn->task()->name() << "' failed. Daemon is shutting down. Reason - " << fn->reason().displayText());
|
||||
|
||||
if (const DB::Exception * e = dynamic_cast<const DB::Exception *>(&fn->reason()))
|
||||
{
|
||||
LOG_ERROR(lg, "Stack trace:\n" << e->getStackTrace().toString());
|
||||
}
|
||||
|
||||
ServerApplication::terminate();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user