Standard Error Reporting
Report errors in standard format
- Import error()
-
Imported declaration
- Notes
-
The function error() is used in two very different modes.
When the first parameter is zero,
it is used to format an standard error message but not exit the program.
When the first parameter is non-zero,
it formats a standard error and also exits.
Since both cases format a standard error message,
it is part of the StdError concern.
The second case, where the program exits,
is shared with the ExitError concern.
- Segment Source
- 36: #include "error.h"
- Error message from WrapMem
-
Code insertion
- Segment Source
-
286: error (0, 0, _("virtual memory exhausted"));
- Error message from WrapMem
-
Code insertion
- Segment Source
-
311: error (0, 0, _("virtual memory exhausted"));
- Error message from TempMngr
-
Code insertion
- Segment Source
-
327: error (0, errno, "%s", file);
- Error message from WrapIO
-
Code insertion
- Segment Source
-
348: error (0, errno, "%s", file);
- Error messages from WrapIO
-
Code insertion
Segment Element
Code insertion
-
372: error (0, errno, _("flushing file"));
Segment Element
Code insertion
-
381: error (0, errno, _("error closing file"));
- Error message from OutputBytes
-
Code insertion
- Segment Source
-
393: error (0, errno, _("write error"));
- Error message from Input
-
Code insertion
- Segment Source
-
503: error (0, errno, _("read error"));
- Error message from CheckMode
-
Code insertion
- Segment Source
-
1505: fprintf (stderr, _("%s: disorder on %s\n"), program_name, files[i]);
- Error message from badfieldspec()
-
Notes
-
The basic badfieldspec behavior is simply to exit the program.
Providing the error message and offending input is an extension
on this behavior.
Segment Element
Parameter insertion
- 1636: badfieldspec (const char *s)
Segment Element
Argument modification
-
1638: error (SORT_FAILURE, 0, _("invalid field specification `%s'"), s);
- Error messages from old key spec support
Segment Element
Argument insertion
-
1788: badfieldspec (argv[i]);
Segment Element
Argument insertion
-
1804: badfieldspec (argv[i]);
Segment Element
Argument modification
-
1814: error (0, 0, _("when using the old-style +POS and -POS \
1815: key specifiers,\nthe +POS specifier must come first"));
Segment Element
Argument insertion
-
1828: badfieldspec (argv[i]);
- Error messages from POSIX option parsing (-k).
Segment Element
Code modification
-
1849: error (SORT_FAILURE, 0,
1850: _("option `-k' requires an argument"));
Segment Element
Argument insertion
-
1861: badfieldspec (argv[i]);
Segment Element
Code modification
-
1867: error (0, 0, _("the starting field number argument \
1868: to the `-k' option must be positive"));
1869: badfieldspec (argv[i]);
Segment Element
Code modification
-
1878: error (0, 0, _("starting field spec has `.' but \
1879: lacks following character offset"));
1880: badfieldspec (argv[i]);
Segment Element
Code modification
-
1887: error (0, 0, _("starting field character offset \
1888: argument to the `-k' option\nmust be positive"));
1889: badfieldspec (argv[i]);
Segment Element
Argument insertion
-
1907: badfieldspec (argv[i]);
Segment Element
Code modification
-
1915: error (0, 0, _("field specification has `,' but \
1916: lacks following field spec"));
1917: badfieldspec (argv[i]);
Segment Element
Code modification
-
1925: error (0, 0, _("ending field number argument \
1926: to the `-k' option must be positive"));
1927: badfieldspec (argv[i]);
Segment Element
Code modification
-
1936: error (0, 0, _("ending field spec has `.' \
1937: but lacks following character offset"));
1938: badfieldspec (argv[i]);
Segment Element
Argument insertion
-
1952: badfieldspec (argv[i]);
- Error message from OutSpec option parsing (-o)
- Argument modification
- Segment Source
-
1966: error (SORT_FAILURE, 0,
1967: _("option `-o' requires an argument"));
- Error message from TabSep option parsing (-t).
- Argument modification
- Segment Source
-
1984: error (SORT_FAILURE, 0,
1985: _("option `-t' requires an argument"));
- Error message from TempDir.
-
Argument modification
- Segment Source
-
1995: error (SORT_FAILURE, 0,
1996: _("option `-T' requires an argument"));
- NAME=Error message due to unrecognized option
- Argument modification
- Segment Source
-
2011: fprintf (stderr, _("%s: unrecognized option `-%c'\n"),
2012: argv[0], *s);
- Error messages from Protect
Segment Element
Code insertion
-
2091: error (0, errno, "%s", files[i]);
Segment Element
Code insertion
-
2111: error (0, errno, "%s", files[i]);
- Error messages due to shut down problems
Segment Element
Argument modification
-
2137: error (SORT_FAILURE, errno, _("%s: write error"), outfile);
Segment Element
Argument modification
-
2140: error (SORT_FAILURE, errno, outfile);
Segment Element
Argument modification
-
2142: error (SORT_FAILURE, errno, _("%s: write error"), outfile);