diff options
| author | gingerBill <bill@gingerbill.org> | 2024-03-25 14:46:45 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2024-03-25 14:46:45 +0000 |
| commit | 53b02c5e6fa4d5b500e1bd6cfae9399d6adaf798 (patch) | |
| tree | 6cb5c81312b05b9dc04e98d1dca98fc21c38e2ba /src/error.cpp | |
| parent | 50618759a65bfbc09e9f7b62878ecefff78ab1be (diff) | |
Fix printing errors issue
Diffstat (limited to 'src/error.cpp')
| -rw-r--r-- | src/error.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/error.cpp b/src/error.cpp index e16909839..b18df79b7 100644 --- a/src/error.cpp +++ b/src/error.cpp @@ -600,7 +600,9 @@ gb_internal void syntax_error_with_verbose(TokenPos pos, TokenPos end, char cons gb_internal void compiler_error(char const *fmt, ...) { - print_all_errors(); + if (any_errors()) { + print_all_errors(); + } va_list va; @@ -614,7 +616,9 @@ gb_internal void compiler_error(char const *fmt, ...) { gb_internal void exit_with_errors(void) { - print_all_errors(); + if (any_errors()) { + print_all_errors(); + } gb_exit(1); } |