libGimbal 0.1.0
C17-Based Extended Standard Library and Cross-Language Runtime Framework
Loading...
Searching...
No Matches
GblException Struct Reference

#include <gimbal_exception.h>

Inheritance diagram for GblException:
GblObject GblBox GblITableVariant GblInstance

Data Fields

union { 
 
   GblExceptionClass *   pClass 
 
   GblObject   base 
 
};  
 
GblType resultType
 
GblEnum result
 
GblStringRefpMessage
 
GblThreadpThread
 
const char * pFile
 
const char * pFunction
 
size_t line
 
- Data Fields inherited from GblObject
union { 
 
   GblObjectClass *   pClass 
 
   GblBox   base 
 
};  
 
- Data Fields inherited from GblBox
union { 
 
   GblBoxClass *   pClass 
 
   GblInstance   base 
 
};  
 
struct { 
 
   GblArrayMap *   pFields 
 
   volatile uint16_t   refCounter 
 
   uint16_t   contextType: 1 
 
   uint16_t   constructedInPlace: 1 
 
   uint16_t   derivedFlags: 14 
 
private_ 
 
- Data Fields inherited from GblInstance
GblClasspClass
 

Related Symbols

(Note that these are not member symbols.)

Instance Methods

Methods for creating and accessing GblExceptions

GblExceptionGblException_create (GblType derived, const char *pFile, const char *pFunc, size_t line, GblType resultType, GblEnum result, const char *pFmt,...)
 
GblExceptionGblException_ref (const GblException *pSelf)
 
GblRefCount GblException_unref (GblException *pSelf)
 
const char * GblException_resultString (const GblException *pSelf)
 
GblType GblException_resultType (const GblException *pSelf)
 
GblBool GblException_hasSource (const GblException *pSelf)
 
const char * GblException_file (const GblException *pSelf)
 
const char * GblException_function (const GblException *pSelf)
 
size_t GblException_line (const GblException *pSelf)
 

Detailed Description

Object containing an application error and its context.

Instance structure encapsulating data for a single exception. It consists of a result code, an error message, source code context, and a pointer to the thread that generated it.

See also
GblExceptionClass

Definition at line 84 of file gimbal_exception.h.

Friends And Related Symbol Documentation

◆ GblException_create()

GblException * GblException_create ( GblType  derived,
const char *  pFile,
const char *  pFunc,
size_t  line,
GblType  resultType,
GblEnum  result,
const char *  pFmt,
  ... 
)
related

Creates a GblException of the derived type, with the given properties.

◆ GblException_ref()

GblException * GblException_ref ( const GblException pSelf)
related

Returns a new reference to an existing GblException, incrementing its refcount.

◆ GblException_unref()

GblRefCount GblException_unref ( GblException pSelf)
related

Decrements and returns the refcount of a GblException, potentially destroying it.

◆ GblException_resultString()

const char * GblException_resultString ( const GblException pSelf)
related

Returns the string representation of the GblException::result code.

◆ GblException_resultType()

GblType GblException_resultType ( const GblException pSelf)
related

Returns the enumeration type of the GblException::result code.

◆ GblException_hasSource()

GblBool GblException_hasSource ( const GblException pSelf)
related

Returns GBL_TRUE if the given GblException has a source context associated with it.

◆ GblException_file()

const char * GblException_file ( const GblException pSelf)
related

Returns a non-NULL string containing the source file from which the GblException originated.

◆ GblException_function()

const char * GblException_function ( const GblException pSelf)
related

Returns a non-NULL string containing the function name from which the GblException originated.

◆ GblException_line()

size_t GblException_line ( const GblException pSelf)
related

Returns the source code line number from which the GblException originated.

Field Documentation

◆ pClass

GblExceptionClass* GblException::pClass

Pointer to class/vtable structure.

Definition at line 84 of file gimbal_exception.h.

◆ base

GblObject GblException::base

Inherited base instance structure.

Definition at line 84 of file gimbal_exception.h.

◆ resultType

GblType GblException::resultType

Most derived type of the GblException::result code.

Definition at line 85 of file gimbal_exception.h.

◆ result

GblEnum GblException::result

Result status code representing the error.

Definition at line 86 of file gimbal_exception.h.

◆ pMessage

GblStringRef* GblException::pMessage

Custom message associated with the error.

Definition at line 87 of file gimbal_exception.h.

◆ pThread

GblThread* GblException::pThread

Thread that generated the exception.

Definition at line 88 of file gimbal_exception.h.

◆ pFile

const char* GblException::pFile

Source file from which the exception was generated.

Definition at line 89 of file gimbal_exception.h.

◆ pFunction

const char* GblException::pFunction

Function from which the exception was generated.

Definition at line 90 of file gimbal_exception.h.

◆ line

size_t GblException::line

Line of code form which the exception was generated.

Definition at line 91 of file gimbal_exception.h.


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