summaryrefslogtreecommitdiff
path: root/src/runtime.c
diff options
context:
space:
mode:
authorLLLL Colonq <llll@colonq>2026-05-06 20:43:42 -0400
committerLLLL Colonq <llll@colonq>2026-05-06 20:43:42 -0400
commitcbe112aa52a7ff84935163c442714e49057b2da6 (patch)
tree0fad910714f564f9f14467674016af0be8f6cee8 /src/runtime.c
parent7748d30575151af59844f43a0e9149b18c40f2f1 (diff)
Add pit_get_error
Diffstat (limited to 'src/runtime.c')
-rw-r--r--src/runtime.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/runtime.c b/src/runtime.c
index 7c15a0a..4088c4b 100644
--- a/src/runtime.c
+++ b/src/runtime.c
@@ -155,6 +155,10 @@ i64 pit_dump(pit_runtime *rt, char *buf, i64 len, pit_value v, bool readable) {
return 0;
}
+pit_value pit_get_error(pit_runtime *rt) {
+ return rt->error;
+}
+
void pit_error(pit_runtime *rt, char *format, ...) {
if (rt->error == PIT_NIL) { /* only record the first error encountered */
char buf[1024] = {0};