summaryrefslogtreecommitdiffabout
path: root/pwmanager/pwmanager/pwmexception.cpp
Unidiff
Diffstat (limited to 'pwmanager/pwmanager/pwmexception.cpp') (more/less context) (show whitespace changes)
-rw-r--r--pwmanager/pwmanager/pwmexception.cpp58
1 files changed, 58 insertions, 0 deletions
diff --git a/pwmanager/pwmanager/pwmexception.cpp b/pwmanager/pwmanager/pwmexception.cpp
new file mode 100644
index 0000000..4c00b04
--- a/dev/null
+++ b/pwmanager/pwmanager/pwmexception.cpp
@@ -0,0 +1,58 @@
1/***************************************************************************
2 * *
3 * copyright (C) 2003, 2004 by Michael Buesch *
4 * email: mbuesch@freenet.de *
5 * *
6 * This program is free software; you can redistribute it and/or modify *
7 * it under the terms of the GNU General Public License version 2 *
8 * as published by the Free Software Foundation. *
9 * *
10 ***************************************************************************/
11
12/***************************************************************************
13 * copyright (C) 2004 by Ulf Schenk
14 * This file is originaly based on version 1.0.1 of pwmanager
15 * and was modified to run on embedded devices that run microkde
16 *
17 * $Id$
18 **************************************************************************/
19
20
21#include "pwmexception.h"
22
23#include <kmessagebox.h>
24
25
26void pwmFatal(const char *id,
27 const char *file,
28 int line)
29{
30 cerr << PROG_NAME " " << id << " at "
31 << file << ":" << line
32 << endl;
33}
34
35void __printError(const string &msg)
36{
37 QString __msg(PROG_NAME " generated a fatal fault:\n");
38 __msg += msg.c_str();
39 cerr << "\n\n" << __msg.latin1() << endl;
40 KMessageBox::error(0, __msg, PROG_NAME " fatal ERROR!");
41}
42
43void __printInfo(const string &msg)
44{
45 cout << PROG_NAME " INFO: " << msg << endl;
46}
47
48void __printWarn(const string &msg)
49{
50 cerr << PROG_NAME " WARNING: " << msg << endl;
51}
52
53#ifdef PWM_DEBUG
54void __printDebug(const string &msg)
55{
56 cout << PROG_NAME " DEBUG: " << msg << endl;
57}
58#endif // PWM_DEBUG