harec

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 140f0af487e647786bb715e0574bc9285a239955
parent c0e87ef0dc1e14f0ae939bcd4b2a5332d4bc6ef8
Author: Bor Grošelj Simić <bor.groseljsimic@telemach.net>
Date:   Mon, 26 Apr 2021 02:10:07 +0200

use exit(EXIT_FAILURE) instead of abort()

in places where harec failed because input file was incorrect

Signed-off-by: Bor Grošelj Simić <bor.groseljsimic@telemach.net>

Diffstat:
Msrc/check.c | 6+++---
Msrc/type_store.c | 4++--
2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/check.c b/src/check.c @@ -35,7 +35,7 @@ expect(const struct location *loc, bool constraint, char *fmt, ...) loc->path, loc->lineno, loc->colno); vfprintf(stderr, fmt, ap); fprintf(stderr, "\n"); - abort(); + exit(EXIT_FAILURE); } } @@ -54,7 +54,7 @@ handle_errors(struct errors *errors) error = next; } if (errors) { - abort(); + exit(EXIT_FAILURE); } } @@ -3549,7 +3549,7 @@ check_internal(struct type_store *ts, if (!unit->declarations) { fprintf(stderr, "Error: module contains no declarations\n"); - abort(); + exit(EXIT_FAILURE); } return ctx.unit; diff --git a/src/type_store.c b/src/type_store.c @@ -21,7 +21,7 @@ expect(const struct location *loc, bool constraint, char *fmt, ...) loc->path, loc->lineno, loc->colno); vfprintf(stderr, fmt, ap); fprintf(stderr, "\n"); - abort(); + exit(EXIT_FAILURE); } } @@ -40,7 +40,7 @@ handle_errors(struct errors *errors) error = next; } if (errors) { - abort(); + exit(EXIT_FAILURE); } }