dmlfw (Daniyal Machine Learning Framework)
dmlfw_error.h File Reference

Centralized error handling interface for the framework. More...

#include <inttypes.h>
#include <dmlfw_types.h>
Include dependency graph for dmlfw_error.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

uint8_t dmlfw_error (void)
 Checks if the last framework call resulted in an error.
 
void dmlfw_get_debug_string (char *debug_string, uint32_t size)
 Copies detailed debug information about the last error into the provided character buffer.
 
uint32_t dmlfw_get_debug_string_length (void)
 Gets the length of the last debug string.
 
uint32_t dmlfw_get_error_code (void)
 Retrieves the error code of the last error.
 
void dmlfw_get_error_string (char *error_string, uint32_t size)
 Copies the last error message into the provided character buffer.
 
uint32_t dmlfw_get_error_string_length (void)
 Gets the length of the last error message string.
 

Detailed Description

Centralized error handling interface for the framework.

Author
Mohammed Daniyal
Version
1.0
Date
2025-09-26

This module provides functions to check and retrieve error statuses, error codes, human-readable messages, and debugging information generated by framework APIs.

All framework functions that can fail internally set an error status. Users should check for errors immediately after calls using dmlfw_error().

If an error occurs, retrieve:

Function Documentation

◆ dmlfw_error()

uint8_t dmlfw_error ( void  )

◆ dmlfw_get_debug_string()

void dmlfw_get_debug_string ( char *  debug_string,
uint32_t  size 
)

◆ dmlfw_get_debug_string_length()

uint32_t dmlfw_get_debug_string_length ( void  )

Gets the length of the last debug string.

Returns
Length in bytes of the debug string.

◆ dmlfw_get_error_code()

uint32_t dmlfw_get_error_code ( void  )

Retrieves the error code of the last error.

Returns
Error code as a 32-bit unsigned integer.

◆ dmlfw_get_error_string()

void dmlfw_get_error_string ( char *  error_string,
uint32_t  size 
)

◆ dmlfw_get_error_string_length()

uint32_t dmlfw_get_error_string_length ( void  )

Gets the length of the last error message string.

Returns
Length in bytes of the error message.