zkutil: Inherited KeeperException from DB::Exception. [#METR-10202]

This commit is contained in:
Michael Kolupaev 2014-04-02 14:38:27 +04:00
parent f885e8680b
commit 91f6a73617

View File

@ -1,15 +1,15 @@
#pragma once
#include <Poco/Exception.h>
#include <statdaemons/Exception.h>
#include <zkutil/Types.h>
namespace zkutil
{
class KeeperException : public Poco::Exception
class KeeperException : public DB::Exception
{
public:
KeeperException(const std::string & msg) : Poco::Exception(msg), code(ReturnCode::Ok) {}
KeeperException(const std::string & msg) : DB::Exception(msg), code(ReturnCode::Ok) {}
KeeperException(const std::string & msg, ReturnCode::type code_)
: Poco::Exception(msg + " (" + ReturnCode::toString(code_) + ")"), code(code_) {}
KeeperException(ReturnCode::type code_)