🟥Errors
C4AI_SDK_Error
The C4AI_SDK_Error
class is designed to handle errors and exceptions within the Cloud4.ai SDK. It provides a unified structure for identifying and processing errors, ensuring consistency and reliability in error handling across different parts of the SDK.
Usage
To use the C4AI_SDK_Error
class, import it into your project from the Cloud4.ai SDK and initialize it with the appropriate parameters. Here's an example of how to use the class:
Parameters
name
The name of the error.
message
The error message.
code
The error code associated with the error.
description
A detailed description of the error.
link
(optional) A link to additional documentation or resources related to the error.
Methods
toJSON()
: Returns a JSON representation of the error object, including all parameters.
Last updated