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

Macros

#define ASN_OK_FRAG   2
 
#define ASN_E_BASE   -100
 
#define ASN_E_INVOBJID   (ASN_E_BASE)
 
#define ASN_E_INVLEN   (ASN_E_BASE-1)
 
#define ASN_E_BADTAG   (ASN_E_BASE-2)
 
#define ASN_E_INVBINS   (ASN_E_BASE-3)
 
#define ASN_E_INVINDEX   (ASN_E_BASE-4)
 
#define ASN_E_INVTCVAL   (ASN_E_BASE-5)
 
#define ASN_E_CONCMODF   (ASN_E_BASE-6)
 
#define ASN_E_ILLSTATE   (ASN_E_BASE-7)
 
#define ASN_E_NOTPDU   (ASN_E_BASE-8)
 
#define ASN_E_UNDEFTYP   (ASN_E_BASE-9)
 
#define ASN_E_INVPERENC   (ASN_E_BASE-10)
 
#define ASN_E_NOTINSEQ   (ASN_E_BASE-11)
 
#define ASN_E_BAD_ALIGN   (ASN_E_BASE-12)
 
#define ASN_E_UNKNOWNPDU   (ASN_E_BASE-13)
 
#define ASN_E_NOTCANON   (ASN_E_BASE-14)
 
#define ASN_E_VALTYPMIS   (ASN_E_BASE-15)
 
#define ASN_E_LEN_FORM   (ASN_E_BASE-16)
 
#define ASN_E_LEN_NOT_MIN   (ASN_E_BASE-17)
 
#define ASN_E_PRIM_REQ   (ASN_E_BASE-18)
 
#define ASN_E_FRAGMENTS   (ASN_E_BASE-19)
 

Detailed Description

This is a list of status codes that can be returned by the ASN1C 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

◆ ASN_E_BAD_ALIGN

#define ASN_E_BAD_ALIGN   (ASN_E_BASE-12)

Encoding has bad alignment. This occurs when an encoding is expected to align with a byte boundary and does not. It may happen with reference to the start of the message or with reference to the start of a length-constrained container. Typically this means some bit string element has too few bits, where the encoding of that element is supposed to end the encoding so that padding cannot be used to acheive the desired alignment.

◆ ASN_E_BADTAG

#define ASN_E_BADTAG   (ASN_E_BASE-2)

Bad tag value. This error code is returned when a tag value is parsed with an identifier code that is too large to fit in a 32-bit integer variable.

◆ ASN_E_BASE

#define ASN_E_BASE   -100

Error base. ASN.1 specific errors start at this base number to distinguish them from common and other error types.

◆ ASN_E_CONCMODF

#define ASN_E_CONCMODF   (ASN_E_BASE-6)

Concurrent list modification error. This error is returned from within a list iterator when it is detected that the list was modified outside the control of the iterator.

◆ ASN_E_FRAGMENTS

#define ASN_E_FRAGMENTS   (ASN_E_BASE-19)

A value is not correctly fragmented as required by the given encoding rules.

◆ ASN_E_ILLSTATE

#define ASN_E_ILLSTATE   (ASN_E_BASE-7)

Illegal state for operation. This error is returned in places where an operation is attempted but the object is not in a state that would allow the operation to be completed. One example is in a list iterator class when an attempt is made to remove a node but the node does not exist.

◆ ASN_E_INVBINS

#define ASN_E_INVBINS   (ASN_E_BASE-3)

Invalid binary string. This error code is returned when decoding XER data and a bit string value is received that contains something other than '1' or '0' characters.

◆ ASN_E_INVINDEX

#define ASN_E_INVINDEX   (ASN_E_BASE-4)

Invalid table constraint index. This error code is returned when a value is provided to index into a table and the value does not match any of the defined indexes.

◆ ASN_E_INVLEN

#define ASN_E_INVLEN   (ASN_E_BASE-1)

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

◆ ASN_E_INVOBJID

#define ASN_E_INVOBJID   (ASN_E_BASE)

Invalid object identifier. This error code is returned when an object identifier is encountered that is not valid. Possible reasons for being invalid include invalid first and second arc identifiers (first must be 0, 1, or 2; second must be less than 40), not enough subidentifier values (must be 2 or more), or too many arc values (maximum number is 128).

◆ ASN_E_INVPERENC

#define ASN_E_INVPERENC   (ASN_E_BASE-10)

Invalid PER encoding. This occurs when a given element within an ASN.1 specification is configured to have an expected PER encoding and the decoded value does not match this encoding.

◆ ASN_E_INVTCVAL

#define ASN_E_INVTCVAL   (ASN_E_BASE-5)

Invalid table constraint value. This error code is returned when a the value for an element in a table-constrained message instance does not match the value for the element defined in the table.

◆ ASN_E_LEN_FORM

#define ASN_E_LEN_FORM   (ASN_E_BASE-16)

Incorrect length form for CER/DER.

◆ ASN_E_LEN_NOT_MIN

#define ASN_E_LEN_NOT_MIN   (ASN_E_BASE-17)

Length does not use minimal # of octets.

◆ ASN_E_NOTCANON

#define ASN_E_NOTCANON   (ASN_E_BASE-14)

Encoded data does not conform to canonical rules for the current encoding rules.

◆ ASN_E_NOTINSEQ

#define ASN_E_NOTINSEQ   (ASN_E_BASE-11)

Element not in sequence. This occurs when an element is parsed within a SEQUENCE but is found to not match any of the elements defined for that SEQUENCE.

◆ ASN_E_NOTPDU

#define ASN_E_NOTPDU   (ASN_E_BASE-8)

Encode/Decode method called for non-PDU. This error is returned when an Encode or Decode method is called on a non-PDU. Only PDUs have implementations of these methods.

Referenced by ASN1CType::DecodeFrom(), and ASN1CType::EncodeTo().

◆ ASN_E_PRIM_REQ

#define ASN_E_PRIM_REQ   (ASN_E_BASE-18)

Primitive form encoding is required.

◆ ASN_E_UNDEFTYP

#define ASN_E_UNDEFTYP   (ASN_E_BASE-9)

Element type could not be resolved at run-time. This error is returned when the run-time parser modules is used (Asn1RTProd) to decode a type at run-time and the type of the element could not be resolved.

◆ ASN_E_UNKNOWNPDU

#define ASN_E_UNKNOWNPDU   (ASN_E_BASE-13)

Unknown PDU type. This error occurs in interpreted BER decoders when the PDU type for the message can't be automatically determined. The user in this case must manually specify the PDU type by some external means. For example, if the application has a command-line interface, it may have a '-pdu' option for specifying the PDU type.

◆ ASN_E_VALTYPMIS

#define ASN_E_VALTYPMIS   (ASN_E_BASE-15)

Value/type mismatch. The given value is not valid for the declared type.

◆ ASN_OK_FRAG

#define ASN_OK_FRAG   2

Fragment decode success status. This is returned when decoding is successful but only a fragment of the item was decoded. User should repeat the decode operation in order to fully decode message.