OnixS C++ CME iLink 3 Binary Order Entry Handler 1.18.9
API Documentation
Loading...
Searching...
No Matches
SessionException.h
Go to the documentation of this file.
1/*
2 * Copyright Onix Solutions Limited [OnixS]. All rights reserved.
3 *
4 * This software owned by Onix Solutions Limited [OnixS] and is protected by copyright law
5 * and international copyright treaties.
6 *
7 * Access to and use of the software is governed by the terms of the applicable OnixS Software
8 * Services Agreement (the Agreement) and Customer end user license agreements granting
9 * a non-assignable, non-transferable and non-exclusive license to use the software
10 * for it's own data processing purposes under the terms defined in the Agreement.
11 *
12 * Except as otherwise granted within the terms of the Agreement, copying or reproduction of any part
13 * of this source code or associated reference material to any other location for further reproduction
14 * or redistribution, and any amendments to this copyright notice, are expressly prohibited.
15 *
16 * Any reproduction or redistribution for sale or hiring of the Software not in accordance with
17 * the terms of the Agreement is a violation of copyright law.
18 */
19
20#pragma once
21
25
26#include <string>
27
28#if WIN32
29#pragma warning(push)
30#pragma warning(disable : 4275)
31#pragma warning(disable : 4251)
32#endif
33
34namespace OnixS {
35namespace CME {
36namespace iLink3 {
37namespace Exceptions{
38
42class ONIXS_ILINK3_EXPORTED SessionException : public std::exception
43{
44public:
45 SessionException(SessionErrorReason::Enum reason, const std::string& message);
46
47 SessionException(SessionErrorReason::Enum reason, const std::string& message, const std::exception& cause);
48
50
52
54 {
55 return reason_;
56 }
57
58 const std::string& toString() const ONIXS_ILINK3_NOTHROW
59 {
60 return message_;
61 }
62
63private:
64 std::string message_;
66};
67
68
82
83template <typename MessageType>
96
110
122
155
160 : public SessionException
161{
162public:
163 explicit ResponseTimeoutException(const std::string& rejectReason, int timeoutMilliseconds)
164 : SessionException(SessionErrorReason::LinkErrorIsDetected, rejectReason)
165 , timeout_(timeoutMilliseconds)
166 {}
167
169
172 {
173 return timeout_;
174 }
175
176private:
177 int timeout_;
178};
179
180
192
211
212
228
244
260
276
277
278
279
280}
281}
282}
283}
284
285#if WIN32
286#pragma warning(pop)
287#endif
#define ONIXS_ILINK3_EXPORTED
Definition Compiler.h:175
#define ONIXS_ILINK3_DEFAULT
Definition Compiler.h:202
#define ONIXS_ILINK3_NOTHROW
Definition Compiler.h:176
#define ONIXS_ILINK3_OVERRIDE
Definition Compiler.h:180
BusinessRejectInReplyOnEstablishException(Messaging::BusinessReject521 reject)
CannotEstablishLinkException(int errCode, const std::string &rejectReason)
Constructor.
EstablishmentRejectErrorCode::Enum errorCodes() const
EstablishmentRejectException(Messaging::EstablishmentReject505 reject)
LinkErrorException(const std::string &rejectReason)
NegotiationRejectErrorCode::Enum errorCodes() const
NegotiationRejectException(Messaging::NegotiationReject502 reject)
ResponseTimeoutException(const std::string &rejectReason, int timeoutMilliseconds)
SbeMessageAttachedExceptionBase(SessionErrorReason::Enum reason, const std::string &message, Messaging::SbeMessage sbeMessage)
SessionException(SessionErrorReason::Enum reason, const std::string &message, const std::exception &cause)
SessionErrorReason::Enum reason() const noexcept
const std::string & toString() const noexcept
SessionException(SessionErrorReason::Enum reason, const std::string &message)
const char * what() const noexcept override
~SessionException() noexcept override=default
TerminateInReplyOnEstablishException(Messaging::Terminate507 terminate)
TypedSbeMessageAttachedExceptionBase(SessionErrorReason::Enum reason, const std::string &message, Messaging::SbeMessage sbeMessage)
UnexpectedSequenceNumberException(Messaging::SbeMessage receivedMessage, const std::string &rejectReason, SeqNumber actualSeqNum, SeqNumber expectedSeqNum, Messaging::UInt64 uuid)
Message typify(const SbeMessage &message)
Casts SBE-encoded message to a given type.
MessageHeader::TemplateId MessageTemplateId
Message type (template) identification.
Messaging::UInt32 SeqNumber
Definition Messaging.h:60
Code to identify reason for a Business Message Reject message.
Definition ValuesEnums.h:43
The Establishment Reject message error codes.
The Negotiation Reject message error codes.
The Terminate message error codes.