commit | 36f2c69d991fb92330b59536aa00c14e25d296d0 | [log] [tgz] |
---|---|---|
author | swissChili <swisschili@fastmail.com> | Sun Aug 08 14:31:44 2021 -0700 |
committer | swissChili <swisschili@fastmail.com> | Sun Aug 08 14:31:44 2021 -0700 |
tree | 680e01414a18fa4e7417b2eb71bc95d41eaba3f9 | |
parent | 4691cf6c7820af91ef4d6d697e4214ce4b33df8e [diff] [blame] |
Fix bug in error handling where __sub would be clobbered.
diff --git a/src/lisp/error.c b/src/lisp/error.c index 266f797..bb289e2 100644 --- a/src/lisp/error.c +++ b/src/lisp/error.c
@@ -42,3 +42,12 @@ } } } + +void edebug(struct error err, char *file, int line, const char *func, const char *why) +{ + if (!err.safe_state) + { + fprintf(stderr, "\033[43m%s at\033[0m %s:%d %s\n", why, file, line, func); + ereport(err); + } +}