OnixS C++ B3 BOE Binary Order Entry  1.2.0
API Documentation
ExceptionHelpers.h
Go to the documentation of this file.
1 // Copyright Onix Solutions Limited [OnixS]. All rights reserved.
2 //
3 // This software owned by Onix Solutions Limited [OnixS] and is
4 // protected by copyright law and international copyright treaties.
5 //
6 // Access to and use of the software is governed by the terms of the applicable
7 // OnixS Software Services Agreement (the Agreement) and Customer end user license
8 // agreements granting a non-assignable, non-transferable and non-exclusive license
9 // to use the software for it's own data processing purposes under the terms defined
10 // in the Agreement.
11 //
12 // Except as otherwise granted within the terms of the Agreement, copying or
13 // reproduction of any part of this source code or associated reference material
14 // to any other location for further reproduction or redistribution, and any
15 // amendments to this copyright notice, are expressly prohibited.
16 //
17 // Any reproduction or redistribution for sale or hiring of the Software not in
18 // accordance with the terms of the Agreement is a violation of copyright law.
19 //
20 
21 #pragma once
22 
23 #include <OnixS/B3/BOE/ABI.h>
25 
27 
28 /// Message type (template) identification.
30 
31 /// \private
32 /// Throws an exception on a bad repeating group.
36 void throwBadBinaryBlock();
37 
38 /// \private
39 /// Throws an exception on a bad repeating group entry.
43 void throwDisallowedField();
44 
45 /// \private
46 /// Raises an exception when the given binary block is too small.
50 void throwBinaryBlockIsTooSmall(MessageSize actual, MessageSize required);
51 
52 /// \private
53 /// Raises an exception when the given binary block is too small.
57 void throwBinaryBlockIsTooSmall(MessageSize actual, MessageSize required, const Char*);
58 
59 /// \private
60 /// Raises an exception on a bad message version.
64 void throwBadMessageVersion(SchemaVersion messageVersion, SchemaVersion minimalVersion);
65 
66 /// \private
67 /// Raises an exception on a bad message id.
71 void throwBadSchemaId(SchemaId expected, SchemaId provided);
72 
73 /// \private
74 /// Throws an exception on a bad repeating group entry.
78 void throwNotEnoughSpace();
79 
80 /// \private
84 void throwBadConversion(const Char* typeName);
85 
86 
87 /// \private
88 /// \throw DecodingError
92 void throwIncorrectEncoding(Messaging::UInt16 encoding, const void* data, MessageSize size);
93 
94 /// \private
95 /// \throw UnsufficientDataError
99 void throwNetPacketIsTooSmall(MessageSize actual, MessageSize required);
100 
#define ONIXS_B3_BOE_MESSAGING_NAMESPACE_END
Definition: ABI.h:144
MessageHeader::Version SchemaVersion
SBE-encoded data version type.
Definition: SchemaTraits.h:30
#define ONIXS_B3_BOE_NORETURN
Definition: Compiler.h:190
#define ONIXS_B3_BOE_EXPORTED
Definition: Compiler.h:181
UInt16 MessageSize
Message length type.
Definition: Aliases.h:29
#define ONIXS_B3_BOE_MESSAGING_NAMESPACE_BEGIN
Definition: ABI.h:140
#define ONIXS_B3_BOE_COLDPATH
Definition: Compiler.h:194
char Char
Character type alias.
Definition: String.h:30
UInt16 TemplateId
Template ID used to encode the message.
Definition: Composites.h:43
MessageHeader::SchemaId SchemaId
Definition: SchemaTraits.h:34
MessageHeader::TemplateId MessageTemplateId
Message type (template) identification.