6.2 Function-independent error codes

The following table describes the error codes that all functions might return. These error codes are not listed in the Errors sections, for brevity.

Table 6-2 Function-independent error codes

Symbol Value Meaning
E_u64json_encoding_error -0xB0

One of the following:

  • An invalid 64-bit code was found while parsing a U64JSON value.
  • The explicit size of an array, which was used to skip the array, is inconsistent with the array contents.
  • The explicit size of an object, which was used to skip the object, is incorrect.
  • Duplicate keys appear in an object.
  • The container length exceeds the length of the available data or the container length is shorter than the available data.
  • A number as a string has a parse error.
E_malformatted_request -0xB1

A malformatted request was received. For example, the params member is an array instead of an object.

This error is only returned when the request is sufficiently well-formatted to identify that it is a request, for example it contains a method member, and to enable the return path to be traced back. Requests that contain an invalid or missing method, instId, or request id might not be able to respond to the caller.

E_malformatted_response -0xB2 A malformatted response was received. For example, this is returned when a response was received that contains both an error member and a result member.
E_ok 0 Indicates no error. This is never returned by JSON RPC 2.0 calls because they only return an error object if an error occurred. This value is reserved for the OK case for C++ interfaces or for variables that need to hold a non-error state.
E_unknown_instance_id 0xE100 The instId argument does not specify an existing target instance.
E_function_not_supported_by_instance 0xE110

A function was called with a valid instId argument, but the instance does not support the function that was called.

This error applies only to the function name, not to arguments or their values. This error is also returned when an unsupported global function, without an instId, was called.

E_unsupported_argument_name 0xE111

A function received one or more argument names that it does not support. This error tells the caller that the expected functionality is not available in the function. The caller can fall back to a simpler function call with fewer parameters, if it is designed to do so.

The callee must put an object {"name": X} into error.data of the response object, where X is one of the unsupported argument names. This does not imply that other argument names are valid.

E_unsupported_argument_value 0xE112

A function received an unsupported value for one or more arguments. This is a catch-all error code, which should only be used if a more specific error code is not available.

The callee must put an object {"name": X} into error.data of the response object, where X is the name of one of the arguments containing an unsupported value. This does not imply that other argument values are valid.

E_missing_mandatory_argument 0xE11A

A function was called without a mandatory argument.

The callee must put an object {"name": X} into error.data of the response object, where X is one of the missing argument names. This does not imply that all other arguments are present.

E_argument_type_mismatch 0xE12C

A value of an incompatible type was specified for a function parameter. This includes types of object members that are passed into functions.

See 3.1 JSON data types for type compatibility and conversion rules.

The callee must put an object {"name": X} into error.data of the response object containing the parameter name of one of the errors encountered. This does not imply that other parameters are valid.

It is undefined whether the request was ignored or partially completed. Clients should assume that the request was ignored and should repeat the request.

E_not_supported_while_instance_is_blocked 0xE12D A function F was called by instance A on instance B while instance B is blocked in a synchronous function call to instance A, for example in a synchronous ec_FOO() call. Instance B cannot complete function F while it is blocked in the call to instance A.
E_not_implemented 0xE13B

The function being called or the feature being requested or used is not implemented.

A common use case is to return this in the error member of a ResourceReadResult or ResourceWriteResult for resources that are known to an instance but are not implemented. It might be more useful to return E_not_implemented rather than returning dummy values for partially implemented interfaces during development.

Iris functions should generally not return this error for functionality that will never be implemented. E_function_not_supported_by_instance or the E_*unsupported* errors should be preferred if they are more appropriate.

Non-ConfidentialPDF file icon PDF version101196_0100_03_en
Copyright © 2018, 2019 Arm Limited or its affiliates. All rights reserved.