EMA C++ Edition
OmmException.h
Go to the documentation of this file.
1/*|-----------------------------------------------------------------------------
2 *| This source code is provided under the Apache 2.0 license
3 *| and is provided AS IS with no warranty or guarantee of fit for purpose.
4 *| See the project's LICENSE.md for details.
5 *| Copyright (C) 2020, 2024 LSEG. All rights reserved. --
6 *|-----------------------------------------------------------------------------
7 */
8
9#ifndef __refinitiv_ema_access_OmmException_h
10#define __refinitiv_ema_access_OmmException_h
11
31#define MAX_SIZE 2048
32#define PADDING 264
33#define MAX_SIZE_PLUS_PADDING MAX_SIZE + PADDING
34
36
37namespace refinitiv {
38
39namespace ema {
40
41namespace access {
42
43class EmaString;
44
46{
47public :
48
53 {
70 OmmJsonConverterExceptionEnum
71 };
72
74
75
79
83 virtual ExceptionType getExceptionType() const = 0;
84
88 virtual const EmaString& getText() const = 0;
89
93 virtual const EmaString& toString() const = 0;
94
99 operator const char*() const;
101
102protected :
103
105 virtual ~OmmException();
106
107 OmmException& statusText( const EmaString& statusText );
108 OmmException& statusText( const char* statusText );
109
110 const EmaString& toStringInt() const;
111
113 UInt32 _errorTextPadding; // _errorText buffer is used for placement new and needs to be 64-bit aligned
114 mutable char _errorText[MAX_SIZE];
115 mutable char _space[MAX_SIZE_PLUS_PADDING];
116
119};
120
121}
122
123}
124
125}
126
127#endif // __refinitiv_ema_access_OmmException_h
Common.h file provides definitions of common variable types used in EMA.
#define EMA_ACCESS_API
Definition: Common.h:95
#define MAX_SIZE
Definition: OmmException.h:31
#define MAX_SIZE_PLUS_PADDING
Definition: OmmException.h:33
*|--------------------------------------------------------------------------—
Definition: AckMsg.h:62
unsigned int UInt32
represents 32-bit unsigned integer
Definition: Common.h:56
The access namespace contains all interfaces and definitions specified for use with the EMA Access pa...
The ema namespace contains all interfaces and definitions specified for use with EMA.
EmaString class is a container of a null terminated Ascii character string.
Definition: EmaString.h:57
OmmException is a parent class for all exception types thrown by EMA.
Definition: OmmException.h:46
OmmException & statusText(const char *statusText)
virtual ExceptionType getExceptionType() const =0
virtual const EmaString & toString() const =0
OmmException(const OmmException &)
OmmException & statusText(const EmaString &statusText)
const EmaString & toStringInt() const
const EmaString & getExceptionTypeAsString() const
virtual const EmaString & getText() const =0
OmmException & operator=(const OmmException &)