OnixS C++ FIX Engine  4.2.0
API Documentation
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>
25 
26 namespace OnixS {
27 namespace FIX {
28 /// Engine-level exception.
29 typedef std::exception Exception;
30 
31 /// Engine-level runtime error;
32 typedef std::runtime_error RuntimeError;
33 
34 /// First received message is not a Logon (MsgType=A) FIX Message.
36 {
37 public:
38  /// Constructor.
39  FirstMessageNotLogonException(const std::string & message, const Message & incomingMessage)
40  : RuntimeError(message)
41  , incomingMessage_(incomingMessage)
42  {}
43 
44  /// Destructor.
45  virtual ~FirstMessageNotLogonException() throw() {}
46 
47  /// Returns the received FIX Message.
48  const Message & message() const {
49  return incomingMessage_;
50  }
51 
52 private:
53  Message incomingMessage_;
54 };
55 
56 /// Telecommunication link error is detected after sending the initial Logon message.
58 {
59 public:
60  /// Constructor.
61  LinkErrorException(const std::string & message)
62  : RuntimeError(message)
63  {}
64 
65  /// Destructor.
66  virtual ~LinkErrorException() throw() {}
67 };
68 
69 /// First received message is a Logon message with wrong sequence number.
71 {
72 public:
73  /// Constructor.
74  UnexpectedSequenceNumberException(const std::string & message)
75  : RuntimeError(message)
76  {}
77 
78  /// Destructor.
80 };
81 
82 /// Timeout is occurred after sending the initial Logon message.
84 {
85 public:
86  /// Constructor.
87  TimeoutException(const std::string & message)
88  : RuntimeError(message)
89  {}
90 
91  /// Destructor.
92  virtual ~TimeoutException() throw() {}
93 };
94 
95 /// First received message is an invalid Logon message.
97 {
98 public:
99  /// Constructor.
100  ConfirmationLogonMessageErrorException(const std::string & message)
101  : RuntimeError(message)
102  {}
103 
104  /// Destructor.
106 };
107 }
108 }
First received message is not a Logon (MsgType=A) FIX Message.
Definition: Exception.h:35
virtual ~TimeoutException()
Destructor.
Definition: Exception.h:92
UnexpectedSequenceNumberException(const std::string &message)
Constructor.
Definition: Exception.h:74
#define ONIXS_FIXENGINE_THROWABLE_API
Definition: ABI.h:46
virtual ~ConfirmationLogonMessageErrorException()
Destructor.
Definition: Exception.h:105
First received message is a Logon message with wrong sequence number.
Definition: Exception.h:70
const Message & message() const
Returns the received FIX Message.
Definition: Exception.h:48
std::runtime_error RuntimeError
Engine-level runtime error;.
Definition: Exception.h:32
FirstMessageNotLogonException(const std::string &message, const Message &incomingMessage)
Constructor.
Definition: Exception.h:39
First received message is an invalid Logon message.
Definition: Exception.h:96
virtual ~FirstMessageNotLogonException()
Destructor.
Definition: Exception.h:45
TimeoutException(const std::string &message)
Constructor.
Definition: Exception.h:87
std::exception Exception
Engine-level exception.
Definition: Exception.h:29
virtual ~UnexpectedSequenceNumberException()
Destructor.
Definition: Exception.h:79
Timeout is occurred after sending the initial Logon message.
Definition: Exception.h:83
Encapsulates operations over a FIX Message.
Definition: Message.h:49
ConfirmationLogonMessageErrorException(const std::string &message)
Constructor.
Definition: Exception.h:100