blob: 0121a40f2aacddaa3e4adc42989a019521368fa0 (
plain)
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
/***************************************************************************
begin : Tue Aug 6 2002
copyright : (C) 2002 by Christian Hubinger
email : chubinger@irrsinnig.org
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef KMFERROR_H
#define KMFERROR_H
#include <tqstring.h>
#include <kdemacros.h>
#include <tqstringlist.h>
/**
*@author Christian Hubinger
*/
using namespace std;
namespace KMF {
class KDE_EXPORT KMFError {
// using namespace ;
public:
/** Contains the option commands for each option type. */
static KMFError* parseErrors( TQStringList& errors );
static const TQString& getAsString( int error_type, const TQString& msg );
public:
KMFError();
~KMFError();
enum { OK = 0, HINT = 1, NORMAL = 2, FATAL = 3, WARNING = 4 };
/** Set the error message */
void setErrMsg( const TQString& msg );
/** Sets the message type */
void setErrType( int type );
/** get the Error message */
const TQString& errMsg() const {
return m_err_msg;
};
/** Get the error number */
int errNum() const {
return m_err_num;
};
/** Get the error type e.g. HINT, FATAL etc.*/
int errType() const {
return m_err_type;
};
private:
int m_err_type;
TQString m_err_msg;
int m_err_num;
};
}
#endif
|