OrbbecSDK 2.5.5
OrbbecSDK: Software-Development-Kit for Orbbec 3D Cameras
Loading...
Searching...
No Matches
Error.h File Reference

Functions for handling errors, mainly used for obtaining error messages. More...

#include "ObTypes.h"

Go to the source code of this file.

Macros

#define ob_error_status   ob_error_get_status
#define ob_error_message   ob_error_get_message
#define ob_error_function   ob_error_get_function
#define ob_error_args   ob_error_get_args
#define ob_error_exception_type   ob_error_get_exception_type

Functions

OB_EXPORT ob_errorob_create_error (ob_status status, const char *message, const char *function, const char *args, ob_exception_type exception_type)
 Create a new error object.
OB_EXPORT ob_status ob_error_get_status (const ob_error *error)
 Get the error status.
OB_EXPORT const char * ob_error_get_message (const ob_error *error)
 Get the error message.
OB_EXPORT const char * ob_error_get_function (const ob_error *error)
 Get the name of the API function that caused the error.
OB_EXPORT const char * ob_error_get_args (const ob_error *error)
 Get the error parameters.
OB_EXPORT ob_exception_type ob_error_get_exception_type (const ob_error *error)
 Get the type of exception that caused the error.
OB_EXPORT void ob_delete_error (ob_error *error)
 Delete the error object.

Detailed Description

Functions for handling errors, mainly used for obtaining error messages.

Definition in file Error.h.

Macro Definition Documentation

◆ ob_error_status

#define ob_error_status   ob_error_get_status

Definition at line 76 of file Error.h.

◆ ob_error_message

#define ob_error_message   ob_error_get_message

Definition at line 77 of file Error.h.

◆ ob_error_function

#define ob_error_function   ob_error_get_function

Definition at line 78 of file Error.h.

◆ ob_error_args

#define ob_error_args   ob_error_get_args

Definition at line 79 of file Error.h.

◆ ob_error_exception_type

#define ob_error_exception_type   ob_error_get_exception_type

Definition at line 80 of file Error.h.

Function Documentation

◆ ob_create_error()

OB_EXPORT ob_error * ob_create_error ( ob_status status,
const char * message,
const char * function,
const char * args,
ob_exception_type exception_type )

Create a new error object.

Parameters
statusThe error status.
messageThe error message.
functionThe name of the API function that caused the error.
argsThe error parameters.
exception_typeThe type of exception that caused the error.
Returns
ob_error* The new error object.

Referenced by ob::StreamProfileFactory::create().

◆ ob_error_get_status()

OB_EXPORT ob_status ob_error_get_status ( const ob_error * error)

Get the error status.

Parameters
[in]errorThe error object.
Returns
The error status.

◆ ob_error_get_message()

OB_EXPORT const char * ob_error_get_message ( const ob_error * error)

Get the error message.

Parameters
[in]errorThe error object.
Returns
The error message.

◆ ob_error_get_function()

OB_EXPORT const char * ob_error_get_function ( const ob_error * error)

Get the name of the API function that caused the error.

Parameters
[in]errorThe error object.
Returns
The name of the API function.

◆ ob_error_get_args()

OB_EXPORT const char * ob_error_get_args ( const ob_error * error)

Get the error parameters.

Parameters
[in]errorThe error object.
Returns
The error parameters.

◆ ob_error_get_exception_type()

OB_EXPORT ob_exception_type ob_error_get_exception_type ( const ob_error * error)

Get the type of exception that caused the error.

Parameters
[in]errorThe error object.
Returns
The type of exception.

◆ ob_delete_error()

OB_EXPORT void ob_delete_error ( ob_error * error)

Delete the error object.

Parameters
[in]errorThe error object to delete, you should set the pointer to NULL after calling this function.

Referenced by ob::Error::handle(), and ob::Error::~Error().