Skip to content

Commit 48a5499

Browse files
pcloudsgitster
authored andcommitted
parse-options.c: turn some die() to BUG()
These two strings are clearly not for the user to see. Reduce the violence in one string while at there. Signed-off-by: Nguyễn Thái Ngọc Duy <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 9440b83 commit 48a5499

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

parse-options.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ static int get_value(struct parse_opt_ctx_t *p,
197197
return 0;
198198

199199
default:
200-
die("should not happen, someone must be hit on the forehead");
200+
BUG("opt->type %d should not happen", opt->type);
201201
}
202202
}
203203

@@ -424,7 +424,7 @@ void parse_options_start(struct parse_opt_ctx_t *ctx,
424424
ctx->flags = flags;
425425
if ((flags & PARSE_OPT_KEEP_UNKNOWN) &&
426426
(flags & PARSE_OPT_STOP_AT_NON_OPTION))
427-
die("STOP_AT_NON_OPTION and KEEP_UNKNOWN don't go together");
427+
BUG("STOP_AT_NON_OPTION and KEEP_UNKNOWN don't go together");
428428
parse_options_check(options);
429429
}
430430

0 commit comments

Comments
 (0)