blob: 74bcb8daf4046259c93d8b1b04c573af19d63a54 (
plain)
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
// **********************************************************************
//
// Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************
#include <Ice/RequestHandler.h>
#include <Ice/Reference.h>
using namespace std;
using namespace IceInternal;
#ifdef ICE_CPP11_MAPPING
RetryException::RetryException(std::exception_ptr ex) : _ex(ex)
{
}
RetryException::RetryException(const RetryException& ex) : _ex(ex.get())
{
}
exception_ptr
RetryException::get() const
{
assert(_ex);
return _ex;
}
#else
IceUtil::Shared* IceInternal::upCast(RequestHandler* p) { return p; }
IceUtil::Shared* IceInternal::upCast(CancellationHandler* p) { return p; }
RetryException::RetryException(const Ice::LocalException& ex)
{
_ex.reset(ex.ice_clone());
}
RetryException::RetryException(const RetryException& ex)
{
_ex.reset(ex.get()->ice_clone());
}
const Ice::LocalException*
RetryException::get() const
{
assert(_ex.get());
return _ex.get();
}
#endif
RequestHandler::RequestHandler(const ReferencePtr& reference) :
_reference(reference),
_response(reference->getMode() == Reference::ModeTwoway)
{
}
|