mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-30 05:30:51 +00:00
21 lines
406 B
C++
21 lines
406 B
C++
#include <DB/IO/WriteHelpers.h>
|
|
|
|
namespace DB
|
|
{
|
|
|
|
void writeException(const Exception & e, WriteBuffer & buf)
|
|
{
|
|
writeBinary(e.code(), buf);
|
|
writeBinary(String(e.name()), buf);
|
|
writeBinary(e.displayText(), buf);
|
|
writeBinary(e.getStackTrace().toString(), buf);
|
|
|
|
bool has_nested = e.nested() != nullptr;
|
|
writeBinary(has_nested, buf);
|
|
|
|
if (has_nested)
|
|
writeException(Exception(*e.nested()), buf);
|
|
}
|
|
|
|
}
|