x-engine-c v0.2.13
The C engine for x-lang
Loading...
Searching...
No Matches
err.c File Reference

The raised-error type: a structured error value the language owns. More...

#include "x-obj.h"
#include "x-type.h"
#include "x-eval-layout.h"
#include "x-type/err.h"

Functions

x_obj_tx_type_err_struct (x_obj_t *p_base, x_obj_t *p_obj)
 
x_obj_tx_type_err_register (x_obj_t *p_base, x_obj_t *p_args)
 

Variables

x_satom_t x_type_err_name
 
x_satom_t x_type_err_struct_prim
 

Detailed Description

The raised-error type: a structured error value the language owns.

Author
Jon Ruttan (jonru.nosp@m.ttan.nosp@m.@gmai.nosp@m.l.co.nosp@m.m)

Function Documentation

◆ x_type_err_register()

x_obj_t * x_type_err_register ( x_obj_t p_base,
x_obj_t p_args 
)

Register or retrieve the ERR type on the base context.

Parameters
p_basex_obj_t* – Base (execution context)
p_argsx_obj_t* – Unused
Returns
x_obj_t* – Registered type object

◆ x_type_err_struct()

x_obj_t * x_type_err_struct ( x_obj_t p_base,
x_obj_t p_obj 
)

Build the ERR type descriptor.

Name only. No make handler: an ERR is not constructed from x-lang – the base owns the single instance and the raise path fills it. No write or display handler either: those stacks are the language's extension point and boot empty on purpose, so an ERR renders as the bounded #<obj:ERR> form until x-lang's err-io.x pushes the prose.

Parameters
p_basex_obj_t* – Base (execution context)
p_objx_obj_t* – Unused
Returns
x_obj_t* – Type descriptor pair list

Variable Documentation

◆ x_type_err_name

x_satom_t x_type_err_name
Initial value:
=
#define X_TYPE_ERR_NAME
Definition err.h:23
@ X_OBJ_FLAG_NONE
Definition x-obj.h:129
#define x_obj_set(T, F,...)
Definition x-obj.h:342
x_satom_t x_type_atom_obj
Definition x-obj.c:31
char x_char_t
Definition x.h:138

◆ x_type_err_struct_prim

x_satom_t x_type_err_struct_prim
Initial value:
=
x_obj_t * x_type_err_struct(x_obj_t *p_base, x_obj_t *p_obj)
Definition err.c:69
Definition x-obj.h:212