summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorSofia Balicka <balicka@kolabsys.com>2012-12-03 15:24:08 (GMT)
committerSofia Balicka <balicka@kolabsys.com>2012-12-03 15:24:08 (GMT)
commit4c4f5f2cd1c47a971e030b0426d9c3425a1011e2 (patch)
tree7a8693b0860ddb255f8fe9f826c332c923cd4e25 /utils
parentc78c8e316668d51b1135ea2ee4e937496a6560f2 (diff)
downloadlibkolab-4c4f5f2cd1c47a971e030b0426d9c3425a1011e2.tar.gz
Improved error handlingformatchecker
Diffstat (limited to 'utils')
-rw-r--r--utils/kolabformatchecker.cpp14
1 files changed, 3 insertions, 11 deletions
diff --git a/utils/kolabformatchecker.cpp b/utils/kolabformatchecker.cpp
index b28c4a0..cfca944 100644
--- a/utils/kolabformatchecker.cpp
+++ b/utils/kolabformatchecker.cpp
@@ -3,14 +3,13 @@
#include <string>
#include <vector>
#include <kolabformat.h>
+#include "kolabformat/errorhandler.h"
#include "tests/testutils.h"
#include "kolabformat/kolabobject.h"
-#include "kolabformat/errorhandler.h"
#include "qstring.h"
namespace po = boost::program_options;
using namespace std;
-using namespace Kolab;
int main(int argc, char *argv[])
{
@@ -42,8 +41,6 @@ int main(int argc, char *argv[])
return -1;
}
- ErrorHandler::handleLibkolabxmlErrors();
-
int returnValue = 0;
cout << endl;
@@ -51,8 +48,6 @@ int main(int argc, char *argv[])
for(vector<string>::const_iterator it = inputFiles.begin();
it != inputFiles.end(); it++){
- ErrorHandler::clearErrors();
-
cout << "File: " << *it << endl;
bool ok;
@@ -65,11 +60,8 @@ int main(int argc, char *argv[])
}
Kolab::KolabObjectReader reader(message);
-
- if (error()){
- cout << "Error: " << errorMessage() << endl;
- returnValue = -1;
- } else if (ErrorHandler::errorOccured()){
+
+ if (Kolab::ErrorHandler::errorOccured()){
cout << "Errors occured during parsing." << endl;
returnValue = -1;
} else {