TOP

ASN.1/C++ Encoder/Decoder Return Codes

Applies to: ASN.1/C++ v7.3
Code Error Description
1
MORE_BUF
User-provided output buffer is too small.
2
NEGATIVE_UINTEGER
An INTEGER value that was constrained to be greater than zero is negative.
3
PDU_RANGE
The PDU number passed to the encoder/decoder does not match any PDU number in the ASN.1 specification. In ASN.1/C++, this error often means that the control information is destroyed or the wrong OssControl object is specified as the function parameter.
4
MORE_INPUT
The end of the input buffer was reached prematurely, before the PDU could be decoded.
5
DATA_ERROR
The encoded data is invalid.
6
BAD_ARG
An incorrect value, probably a NULL pointer, was passed to a routine.
7
BAD_VERSION
There is a discrepancy between the ASN.1/C++ compiler-generated files and the runtime library they are linked to. There are a few causes:
  • The files generated by a trial license compiler are linked with a non-trial runtime library, or vice versa.
  • In general, compiler versions and runtime versions can be mixed. However, the output from 4.0+ compilers cannot be used with pre-4.0 runtimes, and vice versa.
  • The asn1dflt file used by the compiler when cross-compiling does not match the actual target platform.
8
OUT_MEMORY
Out of memory.
9
BAD_CHOICE
During encoding, an unknown CHOICE selector is encountered. The input object is corrupt.
9
PDU_MISMATCH
During decoding, the type derived from the BER or XML tag does not match the object type being decoded.
10
BAD_OBJID
During encoding, an OBJECT IDENTIFIER value does not conform to the X.208 standard.
10
LIMITED
During decoding, an implementation limit is exceeded. For example, an INTEGER value is too large.
11
BAD_PTR
An unexpected NULL pointer is encountered in the object being encoded, which means that the input object is corrupt.
12
BAD_TIME
An illegal OssGeneralizedTime, OssUTCTime, or XML time value is found.
13
INDEFINITE_NOT_SUPPORTED
BER indefinite-length encoding is not supported.
14
MEM_ERROR
A memory violation error occurred, which could mean that an invalid pointer was passed to the function, or an object passed as a parameter is corrupt.
15
BAD_TABLE
The encoder/decoder control table is bad; the OssControl object is probably corrupt.
16
TOO_LONG
Encoding a value that exceeds a specified SIZE constraint is attempted while strong constraint checking is disabled.
17
CONSTRAINT_VIOLATED
A constraint violation occurred.
18
FATAL_ERROR
A serious error occurred, probably due to corrupt memory.
19
ACCESS_SERIALIZATION_ERROR
An error occurred while accessing global data in a multi-threaded environment (Microsoft Windows 32-bit only).
20
NULL_TBL
The pointer to the encoder/decoder control table is NULL, caused by using an uninitialized or improperly initialized OssControl object.
21
NULL_FCN
An internal encoder/decoder pointer is NULL, caused either by using an improperly initialized OssControl object or by corrupt memory.
22
BAD_ENCRULES
Unknown encoding rules are set in the OssControl object; the OssControl object is corrupt.
23
UNAVAIL_ENCRULES
The requested encoding rules are not linked. For example, to use PER specify the -per compiler option when compiling the ASN.1 specification.
24
CANT_OPEN_TRACE_WINDOW
Error when opening a trace window (Microsoft Windows 32-bit only).
25
UNIMPLEMENTED
The requested feature is not yet implemented.
26
OID_DLL_NOT_LINKED
OBJECT IDENTIFIER DLL is not linked (Microsoft Windows 32-bit only).
27
CANT_OPEN_TRACE_FILE
An error occurred when opening the trace file set by the OssControl::setOutputFile function.
28
TRACE_FILE_ALREADY_OPEN
You are trying to open a trace file that is already open.
29
TABLE_MISMATCH
The type being encoded is not defined in the current control table.
30
TYPE_NOT_SUPPORTED
ASN.1 type is not supported.
31
REAL_DLL_NOT_LINKED
REAL DLL is not linked (Microsoft Windows 32-bit only).
32
REAL_CODE_NOT_LINKED
REAL code is not linked.
33
OUT_OF_RANGE
Parameter value range error.
34
COPIER_DLL_NOT_LINKED
Copier DLL is not linked. (Microsoft Windows 32-bit only).
35
CONSTRAINT_DLL_NOT_LINKED
Constraint checker DLL is not linked (Microsoft Windows 32-bit only).
36
COMPARATOR_DLL_NOT_LINKED
Value comparator DLL is not linked (Microsoft Windows 32-bit only).
37
COMPARATOR_CODE_NOT_LINKED
Value comparator code is not linked.
38
MEM_MGR_DLL_NOT_LINKED
Memory manager DLL is not linked (Microsoft Windows 32-bit only).
39
TRACING_CODE_NOT_LINKED
Tracing code is not linked.
40
OPEN_TYPE_USER_FIELD_ERROR
An error occurred in a user-defined open type user field copy or compare function.
41
API_DLL_NOT_LINKED
API DLL is not linked (Microsoft Windows 32-bit only).
42
BERDER_DLL_NOT_LINKED
BER/DER DLL is not linked (Microsoft Windows 32-bit only).
43
PER_DLL_NOT_LINKED
PER DLL is not linked (Microsoft Windows 32-bit only).
44
OPEN_TYPE_ERROR
Error in automatic encoding/decoding/copying of an open type value.
45
MUTEX_NOT_CREATED
Mutex was not created to serialize access to global data (Microsoft Windows 32-bit only).
46
CANT_CLOSE_TRACE_FILE
An error occurs when closing the trace file set by the OssControl::setOutputFile function.
47
CANT_SET_START_BUF
The initial buffer for decoding cannot be set.
48
START_BUF_NOT_SET
The initial buffer for decoding is not set.
49
INFO_OBJECT_SET_TABLE_COPY_ERROR
An error occurred while copying the object set table.
50
INFO_OBJECT_ALREADY_EXISTS
Information object already exists.
51
INFO_OBJECT_UNIQUE_FIELD_NOT_FOUND
Unique field is not found in the information object set.
52
INFO_OBJECT_NOT_FOUND
Information object is not found.
53
INFO_OBJECT_SET_NOT_EXTENSIBLE
Information object set is not extensible.
54
ERROR_READING_FROM_DECODER_INPUT_FILE
Error reading from decoder input file (when using an EncodedFile object).
55
DECODER_INPUT_FILE_ALREADY_OPEN
Decoder input file is already open (when using an EncodedFile object).
56
CANT_CLOSE_DECODER_INPUT_FILE
Unable to close the decoder input file (when using an EncodedFile object).
57
CANT_OPEN_DECODER_INPUT_FILE
Unable to open the decoder input file (when using an EncodedFile object).
58
ENCODER_OUTPUT_FILE_ALREADY_OPEN
Encoder output file is already open (when using an EncodedFile object).
59
CANT_CLOSE_ENCODER_OUTPUT_FILE
Unable to close the encoder output file (when using an EncodedFile object).
60
CANT_OPEN_ENCODER_OUTPUT_FILE
Unable to open the encoder output file (when using an EncodedFile object).
66
TYPE_CONSTRAINT
A type constraint is violated.
67
VALUE_NOT_AMONG_ENUMERATED_CONSTRAINT
A value is not among the possible ENUMERATED values.
68
COMPONENT_RELATION_CONSTRAINT
A component relation constraint is violated.
69
TABLE_CONSTRAINT
A table constraint is violated.
70
PRESENCE_CONSTRAINT
A presence constraint is violated.
71
ABSENCE_CONSTRAINT
An absence constraint is violated.
72
PERMITTED_ALPHABET_CONSTRAINT
A permitted alphabet constraint is violated.
73
SIZE_CONSTRAINT_SETOF_SEQOF
A size constraint is violated for SET OF or SEQUENCE OF value.
74
SIZE_CONSTRAINT_STRING
A size constraint is violated for a string value.
75
VALUE_RANGE_CONSTRAINT_REAL
A value range constraint is violated for a REAL value.
76
VALUE_RANGE_CONSTRAINT_UNSIGNED_INTEGER
A value range constraint is violated for an unsigned INTEGER value.
77
VALUE_RANGE_CONSTRAINT_SIGNED_INTEGER
A value range constraint is violated for a signed INTEGER value.
78
SINGLE_VALUE_CONSTRAINT_COMPLEX_TYPE
A single value constraint is violated for a SET, SEQUENCE, CHOICE, SET OF, or SEQUENCE OF value.
79
SINGLE_VALUE_CONSTRAINT_STRING
A single value constraint is violated for a string value.
80
SINGLE_VALUE_CONSTRAINT_REAL
A single value constraint is violated for a REAL value.
81
SINGLE_VALUE_CONSTRAINT_UNSIGNED_INTEGER
A single value constraint is violated for an unsigned INTEGER value.
82
SINGLE_VALUE_CONSTRAINT_SIGNED_INTEGER
A single value constraint is violated for a signed INTEGER value.
83
USER_CONSTRAINT_FUNCTION_ERROR
A user-defined constraint function returned an error.
84
PRINT_DLL_NOT_LINKED
The PER tracing DLL is not linked (Microsoft Windows 32-bit only).
85
EOF_INPUT_FILE
The decoder input file ended prematurely (when using an EncodedFile object).
86
CANT_OPEN_INPUT_FILE
An error occurred when opening an input file.
87
OSS_LEAN_BAD_VERSION
The Lean encoder/decoder version does not match the control table version generated by the ASN.1/C++ compiler. Another cause could be a corrupt control table.
88
OSS_LEAN_AUTOMATIC_ENCDEC_NOT_SUPPORTED
Automatic encoding/decoding of open types is not supported by this version of the LED.
89
OSS_LEAN_RELAYSAFE_NOT_SUPPORTED
The -relaySafe ASN.1 compiler option is not supported by this version of the LED.
90
OSS_LEAN_DER_ENCODER_NOT_SUPPORTED
This version of the LED does not support DER.
91
OSS_LEAN_REALTYPE_NOT_SUPPORTED
This version of the LED does not support the REAL type.
92
OSS_LEAN_REMOVE_NOT_SUPPORTED
This version of the LED does not support the --<REMOVE>-- directive.
93
OSS_LEAN_NOCOPY_NOT_SUPPORTED
This version of the LED does not support the --<NOCOPY>-- directive.
94
OSS_LEAN_DEFERDECODING_NOT_SUPPORTED
This version of the LED does not support the --<DeferDecoding>-- directive.
95
OSS_LEAN_USERHOOKS_NOT_SUPPORTED
This version of the LED does not support user hooks.
96
OSS_LEAN_TRUNCATE_SOF_NOT_SUPPORTED
This version of the LED does not support the --<Truncate>-- directive.
97
OSS_LEAN_POINTER_NOT_ SUPPORTED
This version of the LED does not support the --<POINTER>-- directive.
97
CANT_LOAD_DYNLIBRARY
An error occurred when loading a dynamic library.
98
CANT_LOAD_DYNLIBRARY
An error occurred when unloading a dynamic library.
99
XER_DLL_NOT_LINKED
The XER DLL is not linked (Microsoft Windows 32-bit only).
100
PATTERN_CONSTRAINT
A pattern constraint is violated.
101
PATTERN_CONSTRAINT_NOT_LINKED
Pattern constraint code is not linked (Microsoft Windows 32-bit only).
102
NOCOPY_FRAGMENTED
Should not occur with the current version of ASN.1/C++.
103
BAD_OBJIDNODE
The encoding of an OBJECT IDENTIFIER type violates the ASN.1 standard.
104
ASN1_COMPILER_DLL_NOT_LINKED
The dynamic control table creation DLL is not linked.
105
ASN1_COMPILING_FAILED
The dynamic control table creation routines detected syntax errors in the input ASN.1 specification.
106
TOO_MANY_CMD_LINE_OPTIONS
The number of input command line options exceeds the internal limit.
107
OSS_LEAN_LONGLONG_NOT_SUPPORTED
This version of the LED does not support the --<LONGLONG>-- directive.
108
CONSTRUCTED_NESTING_LIMIT_EXCEEDED
The nesting level of constructed string encodings exceeds the internal limit.
109
SEQ_SET_NESTING_LIMIT_EXCEEDED
The nesting level of constructed types (SEQUENCE, SET, CHOICE, SEQUENCE OF, or SET OF) exceeds the internal limit.
110
EXER_DLL_NOT_LINKED
The E-XER DLL is not linked (Microsoft Windows 32-bit only).
111
DEFAULT_PREFIX_NOT_ALLOWED
Returned by the OssControl::setNamespacePrefix function when the prefix parameter is NULL and the specification does not allow use of the default prefix due to possible ambiguities.
112
UNKNOWN_NAMESPACE_URI
Returned by the OssControl::setNamespacePrefix function when the specified URI is invalid or is not used in the input specification.
113
INVALID_PREFIX
Returned by the OssControl::setNamespacePrefix function when the specified prefix is invalid (not an NCName).
114
PREFIX_ALREADY_ASSIGNED
Returned by the OssControl::setNamespacePrefix function when the specified prefix is already assigned to a different URI.
115
COMPRESS_ERROR
A compression or decompression error occurred.
123
SINGLE_VALUE_CONSTRAINT
A single value constraint is violated for an OBJECT IDENTIFIER, RELATIVE-OID, OID-IRI, RELATIVE-OID-IRI, HUGE INTEGER, or TIME value.
125
CONVERSION_NOT_POSSIBLE
The Binary2XML()/XML2Binary() or Binary2JSON()/JSON2Binary() method detects that the input message contains an encoding that cannot be converted.
126
PRT_ERROR
Error when printing the unencoded data (for example, an unexpected NULL pointer was encountered).
200
OSS_COMPONENT_MISSING
The component requested by the user is missing. For example, the user tried to access an absent OPTIONAL field of a SEQUENCE.
201
OSS_INVALID_INTERVAL
An invalid OssIndex interval is specified in a call to the remove() or extract() function of a SEQUENCE OF or SET OF.
202
OSS_INVALID_POSITION
An invalid position (outside of the buffer) is specified in an EncodedBuffer operation. The same error is returned by the decoder if the special mode was set using the enableSkipPadBytes() method of the EncodedData class and no non-pad bytes were found in the buffer.
203
OSS_INVALID_ALIGNMENT
An invalid encoding alignment is used. For example, the user tried to encode several PDUs in one buffer but the encoding alignment is set to BACK_ALIGN or DEFAULT_ALIGN.
204
OSS_DATA_MISSING
The requested data is missing. For example, trying to get decoded data from an OssOpen object that has only encoded data.
205
OSS_TYPE_MISMATCH
An object is specified that is an unsuitable type. For example, trying to put decoded data from an OssOpen object into a PDU object when the decoded data type does not match the type needed by the PDU object.
206
OSS_UNKNOWN_TYPE
The runtime does not recognize the data type. This is usually caused by improper initialization of an object or by corrupt memory.
207
OSS_INVALID_VALUE
An illegal operation value was passed. The ASN1Handle::asValueNotation function returns the error code when it cannot convert the input value to ASN.1 value notation.
208
OSS_NO_MEMORY
There is insufficient memory for the operation.
209
OSS_INVALID_NOTATION
A string containing no valid ASN.1 value notation was passed to the ASN1Handle::setFromValueNotation function.
210
OSS_UNSUPPORTED_OPERATION
The operation is not supported. For example, encoding several PDUs into one PEREncodedBuffer.
211
OSS_MEMPOOLS_NOT_INITIALIZED
The application attempted to use memory pools, but the memory pool system is not initialized.
212
OSS_MEMPOOL_BUSY
The application attempted to activate or deactivate a memory pool that is owned by another thread.
213
OSS_TIME_INTERVAL_ERROR
The application attempted to set an illegal value in an OssTimeInterval object.
214
OSS_CONTROL_NOT_INITIALIZED
The application attempted to use an OssControl object that has not been properly initialized.


This documentation applies to release 7.3 and later of the OSS® ASN.1 Tools for C++.

Copyright © 2024 OSS Nokalva, Inc. All rights reserved.
No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by any means electronic, mechanical, photocopying, recording or otherwise, without the prior permission of OSS Nokalva, Inc.
Every distributed copy of the OSS® ASN.1 Tools for C++ is associated with a specific license and related unique license number. That license determines, among other things, what functions of the OSS ASN.1 Tools for C++ are available to you.