Apache OpenDALâ„¢ C Binding
The C binding for Apache OpenDALâ„¢
Loading...
Searching...
No Matches
Public Attributes | List of all members
opendal_error Struct Reference

The opendal error type for C binding, containing an error code and corresponding error message. More...

#include <opendal.h>

Public Attributes

enum opendal_code code
 
struct opendal_bytes message
 

Detailed Description

The opendal error type for C binding, containing an error code and corresponding error message.

The normal operations returns a pointer to the opendal_error, and the nullptr normally represents no error has taken placed. If any error has taken place, the caller should check the error code and print the error message.

The error code is represented in opendal_code, which is an enum on different type of errors. The error messages is represented in opendal_bytes, which is a non-null terminated byte array.

Note
1. The error message is on heap, so the error needs to be freed by the caller, by calling opendal_error_free. 2. The error message is not null terminated, so the caller should never use "%s" to print the error message.
See also
opendal_code
opendal_bytes
opendal_error_free

Member Data Documentation

◆ code

enum opendal_code opendal_error::code

◆ message

struct opendal_bytes opendal_error::message

The documentation for this struct was generated from the following file: