File: error_op.h

package info (click to toggle)
libofa 0.9.3-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 1,920 kB
  • ctags: 460
  • sloc: cpp: 24,470; sh: 8,366; makefile: 45; ansic: 14
file content (42 lines) | stat: -rw-r--r-- 1,004 bytes parent folder | download | duplicates (8)
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
/* ------------------------------------------------------------------

   libofa -- the Open Fingerprint Architecture library

   Copyright (C) 2006 MusicIP Corporation
   All rights reserved.

-------------------------------------------------------------------*/
// FILE: "error_op.h"
// MODULE: Header for error object OnePrintError. Client can catch or ignore.
// AUTHOR: Frode Holm
// DATE CREATED: 1/12/06

#ifndef ERR_H_OP
#define ERR_H_OP 1

#include <string> 
using namespace std;

const int  NOFLCODE = -1;
const int  SILENCEONLY = 1;
const int  GENERALFAILURE = 2;
const int FILETOOSHORT = 10;


class OnePrintError {
public:
	OnePrintError(string s) { Mes = s; ErrorCode = NOFLCODE; }
	OnePrintError(string s, int code) { Mes = s; ErrorCode = code; }
	OnePrintError(const int code) { ErrorCode = code; }
	string GetMessage() { return Mes; }
	long GetErrorCode() { return ErrorCode; }
	void SetErrorCode(const int code) { ErrorCode = code; }
private:
	string Mes;
	int ErrorCode;
};



#endif