xref: /386bsd/usr/share/man/cat3/verrx.0 (revision a2142627)
1ERR(3)                    386BSD Programmer's Manual                    ERR(3)
2
3NNAAMMEE
4     eerrrr, vveerrrr, eerrrrxx, vveerrrrxx, wwaarrnn, vvwwaarrnn, wwaarrnnxx, vvwwaarrnnxx - formatted error
5     messages
6
7SSYYNNOOPPSSIISS
8     ##iinncclluuddee <<eerrrr..hh>>
9
10     _v_o_i_d
11     eerrrr(_i_n_t _e_v_a_l, _c_o_n_s_t _c_h_a_r *_f_m_t, ...)
12
13     _v_o_i_d
14     vveerrrr(_i_n_t _e_v_a_l, _c_o_n_s_t _c_h_a_r *_f_m_t, _v_a__l_i_s_t _a_r_g_s)
15
16     _v_o_i_d
17     eerrrrxx(_i_n_t _e_v_a_l, _c_o_n_s_t _c_h_a_r *_f_m_t, ...)
18
19     _v_o_i_d
20     vveerrrrxx(_i_n_t _e_v_a_l, _c_o_n_s_t _c_h_a_r *_f_m_t, _v_a__l_i_s_t _a_r_g_s)
21
22     _v_o_i_d
23     wwaarrnn(_c_o_n_s_t _c_h_a_r *_f_m_t, ...)
24
25     _v_o_i_d
26     vvwwaarrnn(_c_o_n_s_t _c_h_a_r *_f_m_t, _v_a__l_i_s_t _a_r_g_s)
27
28     _v_o_i_d
29     wwaarrnnxx(_c_o_n_s_t _c_h_a_r *_f_m_t, ...)
30
31     _v_o_i_d
32     vvwwaarrnnxx(_c_o_n_s_t _c_h_a_r *_f_m_t, _v_a__l_i_s_t _a_r_g_s)
33
34DDEESSCCRRIIPPTTIIOONN
35     The eerrrr() and wwaarrnn() family of functions display a formatted error
36     message on the standard error output.  In all cases, the last component
37     of the program name, a colon character, and a space are output.  If the
38     _f_m_t argument is not NULL, the formatted error message, a colon character,
39     and a space are output.  In the case of the eerrrr(), vveerrrr(), wwaarrnn(), and
40     vvwwaarrnn() functions, the error message string affiliated with the current
41     value of the global variable _e_r_r_n_o is output.  In all cases, the output
42     is followed by a newline character.
43
44     The eerrrr(), vveerrrr(), eerrrrxx(), and vveerrrrxx() functions do not return, but exit
45     with the value of the argument _e_v_a_l.
46
47EEXXAAMMPPLLEESS
48     Display the current errno information string and exit:
49
50           if ((p = malloc(size)) == NULL)
51                   err(1, NULL);
52           if ((fd = open(file_name, O_RDONLY, 0)) == -1)
53                   err(1, "%s", file_name);
54
55     Display an error message and exit:
56
57           if (tm.tm_hour < START_TIME)
58                   errx(1, "too early, wait until %s", start_time_string);
59
60     Warn of an error:
61
62           if ((fd = open(raw_device, O_RDONLY, 0)) == -1)
63                   warnx("%s: %s: trying the block device",
64                       raw_device, strerror(errno));
65           if ((fd = open(block_device, O_RDONLY, 0)) == -1)
66                   err(1, "%s", block_device);
67
68SSEEEE AALLSSOO
69     strerror(3)
70
71HHIISSTTOORRYY
72     The eerrrr() and wwaarrnn() functions are currently under development.
73
744th Berkeley Distribution       March 19, 1993                               2
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133