ASN1C C/C++ Common Runtime  ASN1C v7.5.x
Macros
Run-time error status codes.

Macros

#define RT_OK   0
 
#define RT_OK_FRAG   2
 
#define RTERR_BUFOVFLW   -1
 
#define RTERR_ENDOFBUF   -2
 
#define RTERR_IDNOTFOU   -3
 
#define RTERR_INVENUM   -4
 
#define RTERR_SETDUPL   -5
 
#define RTERR_SETMISRQ   -6
 
#define RTERR_NOTINSET   -7
 
#define RTERR_SEQOVFLW   -8
 
#define RTERR_INVOPT   -9
 
#define RTERR_NOMEM   -10
 
#define RTERR_INVHEXS   -11
 
#define RTERR_INVREAL   -12
 
#define RTERR_STROVFLW   -13
 
#define RTERR_BADVALUE   -14
 
#define RTERR_TOODEEP   -15
 
#define RTERR_CONSVIO   -16
 
#define RTERR_ENDOFFILE   -17
 
#define RTERR_INVUTF8   -18
 
#define RTERR_OUTOFBND   -19
 
#define RTERR_INVPARAM   -20
 
#define RTERR_INVFORMAT   -21
 
#define RTERR_NOTINIT   -22
 
#define RTERR_TOOBIG   -23
 
#define RTERR_INVCHAR   -24
 
#define RTERR_XMLSTATE   -25
 
#define RTERR_XMLPARSE   -26
 
#define RTERR_SEQORDER   -27
 
#define RTERR_FILNOTFOU   -28
 
#define RTERR_READERR   -29
 
#define RTERR_WRITEERR   -30
 
#define RTERR_INVBASE64   -31
 
#define RTERR_INVSOCKET   -32
 
#define RTERR_INVATTR   -33
 
#define RTERR_REGEXP   -34
 
#define RTERR_PATMATCH   -35
 
#define RTERR_ATTRMISRQ   -36
 
#define RTERR_HOSTNOTFOU   -37
 
#define RTERR_HTTPERR   -38
 
#define RTERR_SOAPERR   -39
 
#define RTERR_EXPIRED   -40
 
#define RTERR_UNEXPELEM   -41
 
#define RTERR_INVOCCUR   -42
 
#define RTERR_INVMSGBUF   -43
 
#define RTERR_DECELEMFAIL   -44
 
#define RTERR_DECATTRFAIL   -45
 
#define RTERR_STRMINUSE   -46
 
#define RTERR_NULLPTR   -47
 
#define RTERR_FAILED   -48
 
#define RTERR_ATTRFIXEDVAL   -49
 
#define RTERR_MULTIPLE   -50
 
#define RTERR_NOTYPEINFO   -51
 
#define RTERR_ADDRINUSE   -52
 
#define RTERR_CONNRESET   -53
 
#define RTERR_UNREACHABLE   -54
 
#define RTERR_NOCONN   -55
 
#define RTERR_CONNREFUSED   -56
 
#define RTERR_INVSOCKOPT   -57
 
#define RTERR_SOAPFAULT   -58
 
#define RTERR_MARKNOTSUP   -59
 
#define RTERR_NOTSUPP   -60 /* feature is not supported */
 
#define RTERR_UNBAL   -61
 
#define RTERR_EXPNAME   -62
 
#define RTERR_UNICODE   -63
 
#define RTERR_INVBOOL   -64
 
#define RTERR_INVNULL   -65
 
#define RTERR_INVLEN   -66
 
#define RTERR_UNKNOWNIE   -67
 
#define RTERR_NOTALIGNED   -68
 
#define RTERR_EXTRDATA   -69
 
#define RTERR_INVMAC   -70
 
#define RTERR_NOSECPARAMS   -71
 
#define RTERR_COPYFAIL   -72
 
#define RTERR_PARSEFAIL   -73
 
#define RTERR_VALCMPERR   -74
 
#define RTERR_BUFCMPERR   -75
 
#define RTERR_INVBITS   -76
 
#define RTERR_RLM   -77
 
#define RTERR_NOCODEC   -78
 
#define RTERR_WOULDBLOCK   -79
 
#define RTERR_NODATA   -80
 

Detailed Description

This is a list of status codes that can be returned by the common run-time functions and generated code. In many cases, additional information and parameters for the different errors are stored in the context structure at the time the error in raised. This additional information can be output using the rtxErrPrint or rtxErrLogUsingCB run-time functions.

Macro Definition Documentation

◆ RT_OK

#define RT_OK   0

Normal completion status.

◆ RT_OK_FRAG

#define RT_OK_FRAG   2

Message fragment return status. This is returned when a part of a message is successfully decoded. The application should continue to invoke the decode function until a zero status is returned.

◆ RTERR_ADDRINUSE

#define RTERR_ADDRINUSE   -52

Address already in use. This status code is returned when an attempt is made to bind a socket to an address that is already in use.

◆ RTERR_ATTRFIXEDVAL

#define RTERR_ATTRFIXEDVAL   -49

Attribute fixed value mismatch. The attribute contained a value that was different than the fixed value defined in the schema for the attribute.

◆ RTERR_ATTRMISRQ

#define RTERR_ATTRMISRQ   -36

Missing required attribute. This status code is returned by the decoder when an XML instance is missing a required attribute value as defined in the XML schema.

◆ RTERR_BADVALUE

#define RTERR_BADVALUE   -14

Bad value. This status code is returned anywhere where an API is expecting a value to be within a certain range and it not within this range. An example is the encoding or decoding date values when the month or day value is not within the legal range (1-12 for month and 1 to whatever the max days is for a given month).

◆ RTERR_BUFCMPERR

#define RTERR_BUFCMPERR   -75

Buffer comparison error. This error is raised when a comparison operation is done on two buffers and they are not equal.

◆ RTERR_BUFOVFLW

#define RTERR_BUFOVFLW   -1

Encode buffer overflow. This status code is returned when encoding into a static buffer and there is no space left for the item currently being encoded.

◆ RTERR_CONNREFUSED

#define RTERR_CONNREFUSED   -56

Connection refused. This status code is returned when an attempt to communicate on an open socket is refused by the host.

◆ RTERR_CONNRESET

#define RTERR_CONNRESET   -53

Remote connection was reset. This status code is returned when the connection is reset by the remote host (via explicit command or a crash.

◆ RTERR_CONSVIO

#define RTERR_CONSVIO   -16

Constraint violation. This status code is returned when constraints defined the schema are violated. These include XSD facets such as min/maxOccurs, min/maxLength, patterns, etc.. Also ASN.1 value range, size, and permitted alphabet constraints.

◆ RTERR_COPYFAIL

#define RTERR_COPYFAIL   -72

Copy failed. This occurs when generated copy functions are unable to complete a copy operation due to a runtime library failure.

◆ RTERR_DECATTRFAIL

#define RTERR_DECATTRFAIL   -45

Attribute decode failed. This status code and parameters are added to the failure status by the decoder to allow the specific attribute on which a decode error was detected to be identified.

◆ RTERR_DECELEMFAIL

#define RTERR_DECELEMFAIL   -44

Element decode failed. This status code and parameters are added to the failure status by the decoder to allow the specific element on which a decode error was detected to be identified.

◆ RTERR_ENDOFBUF

#define RTERR_ENDOFBUF   -2

Unexpected end-of-buffer. This status code is returned when decoding and the decoder expects more data to be available but instead runs into the end of the decode buffer.

◆ RTERR_ENDOFFILE

#define RTERR_ENDOFFILE   -17

Unexpected end-of-file error. This status code is returned when an unexpected end-of-file condition is detected on decode. It is similar to the ENDOFBUF error code described above except that in this case, decoding is being done from a file stream instead of from a memory buffer.

◆ RTERR_EXPIRED

#define RTERR_EXPIRED   -40

Evaluation license expired. This error is returned from evaluation versions of the run-time library when the hard-coded evaluation period is expired.

◆ RTERR_EXPNAME

#define RTERR_EXPNAME   -62

Expected name. This error code is returned when parsing a name/value pair and the name part is expected, but instead a value is encountered.

◆ RTERR_EXTRDATA

#define RTERR_EXTRDATA   -69

Extraneous data. This error is returned when after decoding is complete, additional undecoded data is still present in the message buffer.

◆ RTERR_FAILED

#define RTERR_FAILED   -48

General failure. Low level call returned error.

◆ RTERR_FILNOTFOU

#define RTERR_FILNOTFOU   -28

File not found. This status code is returned if an attempt is made to open a file input stream for decoding and the given file does not exist.

◆ RTERR_HOSTNOTFOU

#define RTERR_HOSTNOTFOU   -37

Host name could not be resolved. This status code is returned from run-time socket functions when they are unable to connect to a given host computer.

◆ RTERR_HTTPERR

#define RTERR_HTTPERR   -38

HTTP protocol error. This status code is returned by functions doing HTTP protocol operations such as SOAP functions. It is returned when a protocol error is detected. Details on the specific error can be obtained by calling rtxErrPrint.

◆ RTERR_IDNOTFOU

#define RTERR_IDNOTFOU   -3

Expected identifier not found. This status is returned when the decoder is expecting a certain element to be present at the current position and instead something different is encountered. An example is decoding a sequence container type in which the declared elements are expected to be in the given order. If an element is encountered that is not the one expected, this error is raised.

◆ RTERR_INVATTR

#define RTERR_INVATTR   -33

Invalid attribute. This status code is returned by the decoder when an attribute is encountered in an XML instance that was not defined in the XML schema.

◆ RTERR_INVBASE64

#define RTERR_INVBASE64   -31

Invalid Base64 encoding. This status code is returned when an error is detected in decoding base64 data.

◆ RTERR_INVBITS

#define RTERR_INVBITS   -76

Invalid bit string error. This error is raised when a bit string is decoded that contains bits that have not been set to zero.

◆ RTERR_INVBOOL

#define RTERR_INVBOOL   -64

Invalid boolean keyword. This error code is returned when an invalid boolean keyword in the format of the language being parsed is encountered. For example, 'true' or 'false' in all lowercase letters may be all that is acceptable.

◆ RTERR_INVCHAR

#define RTERR_INVCHAR   -24

Invalid character. This status code is returned when a character is encountered that is not valid for a given data type. For example, if an integer value is being decoded and a non-numeric character is encountered, this error will be raised.

◆ RTERR_INVENUM

#define RTERR_INVENUM   -4

Invalid enumerated identifier. This status is returned when an enumerated value is being encoded or decoded and the given value is not in the set of values defined in the enumeration facet.

◆ RTERR_INVFORMAT

#define RTERR_INVFORMAT   -21

Invalid value format. This status code is returned when a value is received or passed into a function that is not in the expected format. For example, the time string parsing function expects a string in the form "nn:nn:nn" where n's are numbers. If not in this format, this error code is returned.

◆ RTERR_INVHEXS

#define RTERR_INVHEXS   -11

Invalid hexadecimal string. This status code is returned when decoding a hexadecimal string value and a character is encountered in the string that is not in the valid hexadecimal character set ([0-9A-Fa-f] or whitespace).

◆ RTERR_INVLEN

#define RTERR_INVLEN   -66

Invalid length. This error code is returned when a length value is parsed that is not consistent with other lengths in a message. This typically happens when an inner length within a constructed type is larger than the outer length value.

◆ RTERR_INVMAC

#define RTERR_INVMAC   -70

Invalid Message Authentication Code. This error is returned when a given message's MAC is not the expected value.

◆ RTERR_INVMSGBUF

#define RTERR_INVMSGBUF   -43

Invalid message buffer has been passed to decode or validate method. This status code is returned by decode or validate method when the used message buffer instance has type different from OSMessageBufferIF::XMLDecode.

◆ RTERR_INVNULL

#define RTERR_INVNULL   -65

Invalid null keyword. This error code is returned when an invalid null keyword in the format of the language being parsed is encountered. For example, 'null' in all lowercase letters may be all that is acceptable.

◆ RTERR_INVOCCUR

#define RTERR_INVOCCUR   -42

Invalid number of occurrences. This status code is returned by the decoder when an XML instance contains a number of occurrences of a repeating element that is outside the bounds (minOccurs/maxOccurs) defined for the element in the XML schema.

◆ RTERR_INVOPT

#define RTERR_INVOPT   -9

Invalid option in choice. This status code is returned when encoding or decoding an ASN.1 CHOICE or XSD xsd:choice construct. When encoding, it occurs when a value in the generated 't' member variable is outside the range of indexes of items in the content model group. It occurs on the decode side when an element is received that is not defined in the content model group.

◆ RTERR_INVPARAM

#define RTERR_INVPARAM   -20

Invalid parameter passed to a function or method. This status code is returned by a function or method when it does an initial check on the values of parameters passed in. If a parameter is found to not have a value in the expected range, this error code is returned.

◆ RTERR_INVREAL

#define RTERR_INVREAL   -12

Invalid real number value. This status code is returned when decoding a numeric floating-point value and an invalid character is received (i.e. not numeric, decimal point, plus or minus sign, or exponent character).

◆ RTERR_INVSOCKET

#define RTERR_INVSOCKET   -32

Invalid socket. This status code is returned when an attempt is made to read or write from a scoket and the given socket handle is invalid. This may be the result of not having established a proper connection before trying to use the socket handle variable.

◆ RTERR_INVSOCKOPT

#define RTERR_INVSOCKOPT   -57

Invalid option. This status code is returned when an invalid option is passed to socket.

◆ RTERR_INVUTF8

#define RTERR_INVUTF8   -18

Invalid UTF-8 character encoding. This status code is returned by the decoder when an invalid sequence of bytes is detected in a UTF-8 character string.

◆ RTERR_MARKNOTSUP

#define RTERR_MARKNOTSUP   -59

This error is returned when an attempt is made to mark a stream position on a stream type that does not support it.

◆ RTERR_MULTIPLE

#define RTERR_MULTIPLE   -50

Multiple errors occurred during an encode or decode operation. See the error list within the context structure for a full list of all errors.

◆ RTERR_NOCODEC

#define RTERR_NOCODEC   -78

No codec. This error is returned when the user has configured ASN1C to not generate a decoder for a type, and then that type appears in an encoding.

◆ RTERR_NOCONN

#define RTERR_NOCONN   -55

Not connected. This status code is returned when an operation is issued on an unconnected socket.

◆ RTERR_NODATA

#define RTERR_NODATA   -80

CDR or message file contains no data records.

◆ RTERR_NOMEM

#define RTERR_NOMEM   -10

No dynamic memory available. This status code is returned when a dynamic memory allocation request is made and an insufficient amount of memory is available to satisfy the request.

Referenced by ASN1CType::append().

◆ RTERR_NOSECPARAMS

#define RTERR_NOSECPARAMS   -71

No security parameters provided. This error is returned when a NAS message with either integrity protection or ciphering (or both) is received and the required security parameters needed to decrypt it or validate it have not been provided.

◆ RTERR_NOTALIGNED

#define RTERR_NOTALIGNED   -68

Not aligned error. This is returned when an element is expected to start on a byte-aligned boundary and is found not to start on an unaligned boundary.

◆ RTERR_NOTINIT

#define RTERR_NOTINIT   -22

Context not initialized. This status code is returned when the run-time context structure (OSCTXT) is attempted to be used without having been initialized. This can occur if rtxInitContext is not invoked to initialize a context variable before use in any other API call. It can also occur is there is a license violation (for example, evaluation license expired).

◆ RTERR_NOTINSET

#define RTERR_NOTINSET   -7

Element not in set. This status code is returned when encoding or decoding an ASN.1 SET or XSD xsd:all construct. When encoding, it occurs when a value in the generated _order member variable is outside the range of indexes of items in the content model group. It occurs on the decode side when an element is received that is not defined in the content model group.

◆ RTERR_NOTSUPP

#define RTERR_NOTSUPP   -60 /* feature is not supported */

Feature is not supported. This status code is returned when a feature that is currently not supported is encountered. Support may be added in a future release.

Referenced by ASN1MessageBuffer::getAppInfo().

◆ RTERR_NOTYPEINFO

#define RTERR_NOTYPEINFO   -51

This error is returned when decoding a derived type definition and no information exists as to what type of data is in the element content. When decoding XML, this normally means that an xsi:type attribute was not found identifying the type of content.

◆ RTERR_NULLPTR

#define RTERR_NULLPTR   -47

Null pointer. This status code is returned when a null pointer is encountered in a place where it is expected that the pointer value is to be set.

◆ RTERR_OUTOFBND

#define RTERR_OUTOFBND   -19

Array index out-of-bounds. This status code is returned when an attempt is made to add something to an array and the given index is outside the defined bounds of the array.

◆ RTERR_PARSEFAIL

#define RTERR_PARSEFAIL   -73

Parse failed. This error is raised when an application receives a text or binary message it is unable to parse.

◆ RTERR_PATMATCH

#define RTERR_PATMATCH   -35

Pattern match error. This status code is returned by the decoder when a value in an XML instance does not match the pattern facet defined in the XML schema. It can also be returned by numeric encode functions that cannot format a numeric value to match the pattern specified for that value.

◆ RTERR_READERR

#define RTERR_READERR   -29

Read error. This status code if returned if a read I/O error is encountered when reading from an input stream associated with a physical device such as a file or socket.

◆ RTERR_REGEXP

#define RTERR_REGEXP   -34

Invalid regular expression. This status code is returned when a syntax error is detected in a regular expression value. Details of the syntax error can be obtained by invoking rtxErrPrint to print the details of the error contained within the context variable.

◆ RTERR_RLM

#define RTERR_RLM   -77

RLM error encounterd.

◆ RTERR_SEQORDER

#define RTERR_SEQORDER   -27

Sequence order error. This status code is returned when decoding an ASN.1 SEQUENCE or XSD xsd:sequence construct. It is raised if the elements were received in an order different than that specified in the content model group definition.

◆ RTERR_SEQOVFLW

#define RTERR_SEQOVFLW   -8

Sequence overflow. This status code is returned when decoding a repeating element (ASN.1 SEQUENCE OF or XSD element with min/maxOccurs > 1) and more instances of the element are received than were defined in the constraint.

◆ RTERR_SETDUPL

#define RTERR_SETDUPL   -5

Duplicate element in set. This status code is returned when decoding an ASN.1 SET or XSD xsd:all construct. It is raised if a given element defined in the content model group occurs multiple times in the instance being decoded.

◆ RTERR_SETMISRQ

#define RTERR_SETMISRQ   -6

Missing required element in set. This status code is returned when decoding an ASN.1 SET or XSD xsd:all construct and all required elements in the content model group are not found to be present in the instance being decoded.

◆ RTERR_SOAPERR

#define RTERR_SOAPERR   -39

SOAP error. This status code when an error is detected when trying to execute a SOAP operation.

◆ RTERR_SOAPFAULT

#define RTERR_SOAPFAULT   -58

This error is returned when decoded SOAP envelope is fault message

◆ RTERR_STRMINUSE

#define RTERR_STRMINUSE   -46

Stream in-use. This status code is returned by stream functions when an attempt is made to initialize a stream or create a reader or writer when an existing stream is open in the context. The existing stream must first be closed before initializaing a stream for a new operation.

◆ RTERR_STROVFLW

#define RTERR_STROVFLW   -13

String overflow. This status code is returned when a fixed-sized field is being decoded as specified by a size constraint and the item contains more characters or bytes then this amount. It can occur when a run-time function is called with a fixed-sixed static buffer and whatever operation is being done causes the bounds of this buffer to be exceeded.

◆ RTERR_TOOBIG

#define RTERR_TOOBIG   -23

Value will not fit in target variable. This status is returned by the decoder when a target variable is not large enough to hold a a decoded value. A typical case is an integer value that is too large to fit in the standard C integer type (typically a 32-bit value) on a given platform. If this occurs, it is usually necessary to use a configuration file setting to force the compiler to use a different data type for the item. For example, for integer, the <isBigInteger/> setting can be used to force use of a big integer type.

◆ RTERR_TOODEEP

#define RTERR_TOODEEP   -15

Nesting level too deep. This status code is returned when a preconfigured maximum nesting level for elements within a content model group is exceeded.

◆ RTERR_UNBAL

#define RTERR_UNBAL   -61

Unbalanced structure. This error code is returned when parsing formatted text such as XML or JSON and a block is not properly terminated. For JSON, this occurs when a '{' or '[' character does not a corresponding '}' or ']' respectively. For XML, it occurs when an open element does not have a corresponding end element.

◆ RTERR_UNEXPELEM

#define RTERR_UNEXPELEM   -41

Unexpected element encountered. This status code is returned when an element is encountered in a position where something else (for example, an attribute) was expected.

◆ RTERR_UNICODE

#define RTERR_UNICODE   -63

Invalid Unicode sequence. The sequence of characters received did not comprise a valid unicode character.

◆ RTERR_UNKNOWNIE

#define RTERR_UNKNOWNIE   -67

Unknown information element. This error code is returned when an unknown information element or extension is received and the protocol specification indicates the element must be understood.

◆ RTERR_UNREACHABLE

#define RTERR_UNREACHABLE   -54

Network failure. This status code is returned when the network or host is down or otherwise unreachable.

◆ RTERR_VALCMPERR

#define RTERR_VALCMPERR   -74

Value comparison error. This error is raised when a comparison operation is done on two values and they are not equal.

◆ RTERR_WOULDBLOCK

#define RTERR_WOULDBLOCK   -79

A non-blocking socket could not return any data without blocking.

◆ RTERR_WRITEERR

#define RTERR_WRITEERR   -30

Write error. This status code if returned if a write I/O error is encountered when attempting to output data to an output stream associated with a physical device such as a file or socket.

◆ RTERR_XMLPARSE

#define RTERR_XMLPARSE   -26

XML parser error. This status code in returned when the underlying XML parser application (by default, this is Expat) returns an error code. The parser error code or text is returned as a parameter in the errInfo structure within the context structure.

◆ RTERR_XMLSTATE

#define RTERR_XMLSTATE   -25

XML state error. This status code is returned when the XML parser is not in the correct state to do a certain operation.