File: errlist.c

package info (click to toggle)
saml 970418-3
  • links: PTS
  • area: main
  • in suites: slink
  • size: 1,204 kB
  • ctags: 1,701
  • sloc: ansic: 17,182; sh: 2,583; yacc: 497; perl: 264; makefile: 250; python: 242
file content (44 lines) | stat: -rw-r--r-- 1,121 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/*
 * Copyright 1996 Thierry Bousch
 * Licensed under the Gnu Public License, Version 2
 *
 * $Id: errlist.c,v 1.3 1996/08/18 09:38:12 bousch Exp $
 *
 * List of error messages
 */

#include "saml-errno.h"

const char *saml_errlist[] = {
	"Unknown error",		/*  0 */
	"General error",		/*  1 */
	"Wrong operand type",		/*  2 */
	"Wrong array size",		/*  3 */
	"Type conflict",		/*  4 */
	"Size conflict",		/*  5 */
	"Operation not supported",	/*  6 */
	"Static table is full",		/*  7 */
	"Division by zero",		/*  8 */
	"Out of definition domain",	/*  9 */
	"Index out of range",		/* 10 */
	"Not invertible",		/* 11 */
	"No such type",			/* 12 */
	"Not an array",			/* 13 */
	"Type already defined",		/* 14 */
	"Cannot parse string",		/* 15 */
	"Cannot cast",			/* 16 */
	"Not yet implemented",		/* 17 */
	"Uninitialized",		/* 18 */
	"Heterogeneous operands",	/* 19 */
	"Not a scalar",			/* 20 */
	"Internal overflow",		/* 21 */
	"Object is too sparse",		/* 22 */
	"Not the same modulus"		/* 23 */
};

const char* saml_strerror (int errno)
{
	if ((unsigned)errno > SE_MAX_ERROR)
		errno = 0;
	return saml_errlist[errno];
}