summaryrefslogtreecommitdiff
path: root/libxerces-c/tests/net-accessor/handle-exception-as-error.patch
blob: 674e5bac0e40ece0be4d8ae8430ebbb4b5432327 (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
diff --git a/libxerces-c/tests/net-accessor/NetAccessorTest.cpp b/libxerces-c/tests/net-accessor/NetAccessorTest.cpp
index 3bb735b..c2affbd 100644
--- a/libxerces-c/tests/net-accessor/NetAccessorTest.cpp
+++ b/libxerces-c/tests/net-accessor/NetAccessorTest.cpp
@@ -122,6 +122,8 @@ main(int argc, char** argv)
     // Get the URL
     char* url = argv[1];
     
+    int r = 1;
+
     // Do the test
     try
     {
@@ -148,11 +150,11 @@ main(int argc, char** argv)
 		
 		// Delete the is
 		delete is;
-	
+		r = 0;
     }
     catch(const XMLException& toCatch)
     {
-        XERCES_STD_QUALIFIER cout << "Exception during test:\n    "
+        XERCES_STD_QUALIFIER cerr << "Exception during test:\n    "
              << toCatch.getMessage()
              << XERCES_STD_QUALIFIER endl;
     }
@@ -160,6 +162,6 @@ main(int argc, char** argv)
     // And call the termination method
     XMLPlatformUtils::Terminate();
 
-    return 0;
+    return r;
 }