aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/dns/magic.cpp
blob: b93792146f131709f211d3b5d1e261bcf48cab4f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include "magic.h"

#include <util/generic/yexception.h>

using namespace NDns;

namespace {
    namespace NX {
        struct TError: public IError {
            inline TError()
                : E_(std::current_exception())
            {
            }

            void Raise() override {
                std::rethrow_exception(E_);
            }

            std::exception_ptr E_;
        };
    }
}

IErrorRef NDns::SaveError() {
    using namespace NX;

    return new NX::TError();
}