summaryrefslogtreecommitdiffstats
path: root/yt/cpp/mapreduce/interface/abortable_stream.cpp
blob: fc3b8d01f5b840136cd182e130d1f46a09732730 (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
29
30
31
32
33
34
#include "abortable_stream.h"

#include <yt/cpp/mapreduce/interface/errors.h>

#include <util/system/yassert.h>

namespace NYT {

////////////////////////////////////////////////////////////////////////////////

void IAbortableInputStream::Abort()
{
    Y_ABORT("Unimplemented");
}

bool IAbortableInputStream::IsAborted() const
{
    return false;
}

bool IAbortableInputStream::IsAbortedError(const std::exception_ptr& error)
{
    try {
        std::rethrow_exception(error);
    } catch (const TInputStreamAbortedError& ex) {
        return true;
    } catch (...) {
        return false;
    }
}

////////////////////////////////////////////////////////////////////////////////

} // namespace NYT