source: trunk/include/sh_error_min.h@ 552

Last change on this file since 552 was 481, checked in by katerina, 9 years ago

Enhancements and fixes for tickets #374, #375, #376, #377, #378, and #379.

File size: 1.1 KB
Line 
1#ifndef SH_ERROR_MIN_H
2#define SH_ERROR_MIN_H
3
4/* Level of severity
5 */
6typedef enum {
7
8 SH_ERR_ALL = (1 << 0), /* debug */
9 SH_ERR_INFO = (1 << 1), /* info */
10 SH_ERR_NOTICE = (1 << 2), /* notice */
11 SH_ERR_WARN = (1 << 3), /* warning */
12 SH_ERR_STAMP = (1 << 4), /* mark */
13 SH_ERR_ERR = (1 << 5), /* error */
14 SH_ERR_SEVERE = (1 << 6), /* crit */
15 SH_ERR_FATAL = (1 << 7), /* alert */
16
17 SH_ERR_NOT = (1 << 8),
18 SH_ERR_INET = (1 << 9),
19 SH_ERR_MAX = (1 << 9)
20 } ShErrLevel;
21
22/* this function should be called to report an error
23 */
24void sh_error_handle (int flag, const char * file, long line,
25 long errnum, unsigned long msg_index, ...);
26
27/* this function should be called to (only) send mail
28 */
29void sh_error_mail (const char * alias, int sev,
30 const char * file, long line,
31 long status, unsigned long msg_id, ...);
32
33/* convert a string to a numeric priority
34 */
35int sh_error_convert_level (const char * str_s);
36
37/* error messages
38 */
39char * sh_error_message (int tellme, char * str, size_t len);
40
41#endif
Note: See TracBrowser for help on using the repository browser.