Serene Runtime 1.0.0
C runtime for the Serene programming language
Loading...
Searching...
No Matches
errors.c File Reference
#include "serene/rt/errors.h"
#include "serene/rt/context.h"
#include "serene/utils.h"
Include dependency graph for errors.c:

Go to the source code of this file.

Functions

srn_error_tsrn_errors_make (const srn_context_t *ctx, srn_error_tag_t tag, const char *msg)
 

Function Documentation

◆ srn_errors_make()

srn_error_t * srn_errors_make ( const srn_context_t * ctx,
srn_error_tag_t tag,
const char * msg )

Definition at line 28 of file errors.c.

28 {
29 srn_error_t *err = ALLOC(ctx, srn_error_t);
30 PANIC_IF_NULL(err);
31 err->tag = tag;
32 err->msg = (char *)msg;
33 return err;
34}
#define ALLOC(ctx, T)
Definition context.h:82
char * msg
Definition errors.h:57
srn_error_tag_t tag
Definition errors.h:56
#define PANIC_IF_NULL(ptr)
Definition utils.h:64
Here is the caller graph for this function: