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:
15
pscp.c
15
pscp.c
@ -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;
|
||||
|
Reference in New Issue
Block a user