1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-06-30 19:12:48 -05:00

Get rid of fatalbox() completely.

It's an incoherent concept! There should not be any such thing as an
error box that terminates the entire program but is not modal. If it's
bad enough to terminate the whole program, i.e. _all_ currently live
connections, then there's no point in permitting progress to continue
in windows other than the affected one, because all windows are
affected anyway.

So all previous uses of fatalbox() have become modalfatalbox(), except
those which looked to me as if they shouldn't have been fatal in the
first place, e.g. lingering pieces of error handling in winnet.c which
ought to have had the severity of 'give up on this particular Socket
and close it' rather than 'give up on the ENTIRE UNIVERSE'.
This commit is contained in:
Simon Tatham
2017-11-26 17:43:02 +00:00
parent d1f62c3e0f
commit 4f3f4ed691
11 changed files with 26 additions and 138 deletions

15
pscp.c
View File

@ -91,21 +91,6 @@ static void tell_user(FILE *stream, const char *fmt, ...)
/*
* Print an error message and perform a fatal exit.
*/
void fatalbox(const char *fmt, ...)
{
char *str, *str2;
va_list ap;
va_start(ap, fmt);
str = dupvprintf(fmt, ap);
str2 = dupcat("Fatal: ", str, "\n", NULL);
sfree(str);
va_end(ap);
tell_str(stderr, str2);
sfree(str2);
errs++;
cleanup_exit(1);
}
void modalfatalbox(const char *fmt, ...)
{
char *str, *str2;