summaryrefslogtreecommitdiffhomepage
path: root/lib.h
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2020-10-13 19:01:02 +0200
committerJo-Philipp Wich <jo@mein.io>2020-10-14 12:23:08 +0200
commit07c147a1803270aba871c9024e021fd913cb8e2a (patch)
treed05fcecf8afc6e82b6c659b272d23029a6cc9249 /lib.h
parent05cc0ee7a7c7dc442e22dfdc22c0574ac6b3e71b (diff)
treewide: unify error handling
Get rid of the distinction between lexer/parser errors and runtime exceptions, use exceptions everywhere instead. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'lib.h')
-rw-r--r--lib.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib.h b/lib.h
index 084714d..d391a8d 100644
--- a/lib.h
+++ b/lib.h
@@ -28,6 +28,10 @@ typedef struct json_object *(ut_c_fn)(struct ut_state *, uint32_t, struct json_o
void ut_lib_init(struct ut_state *state, struct json_object *scope);
+struct json_object *ut_execute_source(struct ut_state *s, struct ut_source *src, struct ut_scope *scope);
+
+struct json_object *ut_parse_error(struct ut_state *s, uint32_t off, uint64_t *tokens, int max_token);
+
char *ut_format_error(struct ut_state *state, FILE *fp);
#endif /* __LIB_H_ */