OnixS C++ FIX Engine 4.13.0
API Documentation
Loading...
Searching...
No Matches
Exception.h
Go to the documentation of this file.
1#pragma once
2/*
3* Copyright Onix Solutions Limited [OnixS]. All rights reserved.
4*
5* This software owned by Onix Solutions Limited [OnixS] and is protected by copyright law
6* and international copyright treaties.
7*
8* Access to and use of the software is governed by the terms of the applicable OnixS Software
9* Services Agreement (the Agreement) and Customer end user license agreements granting
10* a non-assignable, non-transferable and non-exclusive license to use the software
11* for it's own data processing purposes under the terms defined in the Agreement.
12*
13* Except as otherwise granted within the terms of the Agreement, copying or reproduction of any part
14* of this source code or associated reference material to any other location for further reproduction
15* or redistribution, and any amendments to this copyright notice, are expressly prohibited.
16*
17* Any reproduction or redistribution for sale or hiring of the Software not in accordance with
18* the terms of the Agreement is a violation of copyright law.
19*/
20
21#include <exception>
22
23#include <OnixS/FIXEngine/ABI.h>
27
28namespace OnixS {
29namespace FIX {
31typedef std::exception Exception;
32
34typedef std::runtime_error RuntimeError;
35
38{
39public:
41 FirstMessageNotLogonException(const std::string & message, const Message & incomingMessage)
43 , incomingMessage_(incomingMessage)
44 {}
45
47 FirstMessageNotLogonException(const std::string & message, const FlatMessage & incomingMessage)
49 , flatIncomingMessage_(incomingMessage)
50 {}
51
54
56 const Message & message() const {
57 return incomingMessage_;
58 }
59
61 const FlatMessage & flatMessage() const {
62 return flatIncomingMessage_;
63 }
64
65private:
66 Message incomingMessage_;
67 FlatMessage flatIncomingMessage_;
68};
69
82
95
108
121
124{
125public:
128 : RuntimeError(message), tag_(tag), failedValidation_(failedValidation)
129 {}
130
133
135 Tag tag() const {
136 return tag_;
137 }
138
141 return failedValidation_;
142 }
143
144private:
145
146 Tag tag_;
147 MessageValidationFlag::Enum failedValidation_;
148};
149
152{
153public:
155 ConnectException(const std::string & message, int errCode = 0)
156 :RuntimeError(message), errCode_(errCode)
157 {}
158
161
163 int errorCode() const {
164 return errCode_;
165 }
166
167private:
168
169 int errCode_;
170};
171
172}
173}
#define ONIXS_FIXENGINE_THROWABLE_API
Definition ABI.h:46
#define ONIXS_FIXENGINE_DEFAULT
Definition Compiler.h:194
#define ONIXS_FIXENGINE_NOTHROW
Definition Compiler.h:186
#define ONIXS_FIXENGINE_OVERRIDE
Definition Compiler.h:191
~ConfirmationLogonMessageErrorException() ONIXS_FIXENGINE_NOTHROW ONIXS_FIXENGINE_OVERRIDE ONIXS_FIXENGINE_DEFAULT
The destructor.
ConfirmationLogonMessageErrorException(const std::string &message)
The constructor.
Definition Exception.h:114
int errorCode() const
Return the system-depended error code value.
Definition Exception.h:163
ConnectException(const std::string &message, int errCode=0)
The constructor.
Definition Exception.h:155
~ConnectException() ONIXS_FIXENGINE_NOTHROW ONIXS_FIXENGINE_OVERRIDE ONIXS_FIXENGINE_DEFAULT
The destructor.
FirstMessageNotLogonException(const std::string &message, const FlatMessage &incomingMessage)
The constructor.
Definition Exception.h:47
~FirstMessageNotLogonException() ONIXS_FIXENGINE_NOTHROW ONIXS_FIXENGINE_OVERRIDE ONIXS_FIXENGINE_DEFAULT
The destructor.
FirstMessageNotLogonException(const std::string &message, const Message &incomingMessage)
The constructor.
Definition Exception.h:41
const FlatMessage & flatMessage() const
Returns the received message.
Definition Exception.h:61
const Message & message() const
Returns the received message.
Definition Exception.h:56
Provides an access to FIX fields from a flat (tag=value) message.
~LinkErrorException() ONIXS_FIXENGINE_NOTHROW ONIXS_FIXENGINE_OVERRIDE ONIXS_FIXENGINE_DEFAULT
The destructor.
LinkErrorException(const std::string &message)
The constructor.
Definition Exception.h:75
Encapsulates operations over a FIX Message.
Definition Message.h:52
TimeoutException(const std::string &message)
The constructor.
Definition Exception.h:101
~TimeoutException() ONIXS_FIXENGINE_NOTHROW ONIXS_FIXENGINE_OVERRIDE ONIXS_FIXENGINE_DEFAULT
The destructor.
UnexpectedSequenceNumberException(const std::string &message)
The constructor.
Definition Exception.h:88
~UnexpectedSequenceNumberException() ONIXS_FIXENGINE_NOTHROW ONIXS_FIXENGINE_OVERRIDE ONIXS_FIXENGINE_DEFAULT
The destructor.
Tag tag() const
Returns the tag number of the invalid field.
Definition Exception.h:135
~ValidationException() ONIXS_FIXENGINE_NOTHROW ONIXS_FIXENGINE_OVERRIDE ONIXS_FIXENGINE_DEFAULT
The destructor.
MessageValidationFlag::Enum failedValidation() const
Returns the validation criteria that fails.
Definition Exception.h:140
ValidationException(const std::string &message, Tag tag, MessageValidationFlag::Enum failedValidation)
The constructor.
Definition Exception.h:127
std::runtime_error RuntimeError
The Engine-level runtime error;.
Definition Exception.h:34
std::exception Exception
The Engine-level exception.
Definition Exception.h:31
unsigned Tag
Alias for tag numbers.
Definition Tag.h:28