ps: add catastrophic_failure()
The catastrophic_failure function tries to make bug reporting useful by telling in which line error occured, and drops core. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
@ -483,7 +483,7 @@ static const char *parse_sysv_option(void){
|
||||
return _("Embedded '-' among SysV options makes no sense.");
|
||||
break;
|
||||
case '\0':
|
||||
return _("Please report the \"SysV \\0 can't happen\" bug.");
|
||||
catastrophic_failure(__FILE__, __LINE__, _("please report this bug"));
|
||||
break;
|
||||
default:
|
||||
return _("Unsupported SysV option.");
|
||||
@ -728,7 +728,7 @@ static const char *parse_bsd_option(void){
|
||||
return _("Embedded '-' among BSD options makes no sense.");
|
||||
break;
|
||||
case '\0':
|
||||
return _("Please report the \"BSD \\0 can't happen\" bug.");
|
||||
catastrophic_failure(__FILE__, __LINE__, _("please report this bug"));
|
||||
break;
|
||||
default:
|
||||
return _("Unsupported option (BSD syntax)");
|
||||
|
Reference in New Issue
Block a user