File: detailed_errors.patch

package info (click to toggle)
simka 1.5.3-10
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,200 kB
  • sloc: cpp: 5,321; python: 672; sh: 386; makefile: 26
file content (103 lines) | stat: -rw-r--r-- 3,155 bytes parent folder | download
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
Description: display more information in caught errors
 The errors are unmarked and understanding the originating source file is not easy, so append the file names and other diagnostic information before the error messages. Do not apply this patch when uploading.
Author: Shayan Doust <hello@shayandoust.me>
Last-Update: 2019-09-13
---

--- simka.orig/src/core/main.cpp
+++ simka/src/core/main.cpp
@@ -33,7 +33,7 @@
     }
     catch (Exception& e)
     {
-        std::cout << "EXCEPTION: " << e.getMessage() << std::endl;
+        std::cout << "[main.cpp] EXCEPTION: " << e.getMessage() << std::endl;
         return EXIT_FAILURE;
     }
 
--- simka.orig/src/core/SimkaAlgorithm.cpp
+++ simka/src/core/SimkaAlgorithm.cpp
@@ -162,7 +162,7 @@
 		layoutInputFilename();
 	}
 	catch (Exception& e){
-		cout << "Syntax error in input file" << endl;
+		cout << "[SimkaAlgorithm.cpp] Syntax error in input file" << endl;
 		return false;
 	}
 
@@ -363,7 +363,7 @@
 			LOCAL(bank);
 		}
 		catch (Exception& e){
-			cerr << "ERROR: Can't open dataset: " << _bankNames[i] << endl;
+			cerr << "[SimkaAlgorithm.cpp] ERROR: Can't open dataset: " << _bankNames[i] << endl;
 			return false;
 		}
 
--- simka.orig/src/core/SimkaCommons.hpp
+++ simka/src/core/SimkaCommons.hpp
@@ -129,7 +129,7 @@
 				nbDatasets += 1;
 			}
 			catch (Exception& e){
-				cerr << "ERROR: Can't open dataset: " << bankId << endl;
+				cerr << "[SimkaCommons.hpp] ERROR: Can't open dataset: " << bankId << endl;
 				error = true;
 			}
 
--- simka.orig/src/SimkaCount.cpp
+++ simka/src/SimkaCount.cpp
@@ -385,7 +385,7 @@
     }
     catch (Exception& e)
     {
-        std::cout << "EXCEPTION: " << e.getMessage() << std::endl;
+        std::cout << "[SimkaCount.cpp] EXCEPTION: " << e.getMessage() << std::endl;
         return EXIT_FAILURE;
     }
 }
--- simka.orig/src/SimkaMerge.cpp
+++ simka/src/SimkaMerge.cpp
@@ -1585,7 +1585,7 @@
     }
     catch (Exception& e)
     {
-        std::cout << "EXCEPTION: " << e.getMessage() << std::endl;
+        std::cout << "[SimkaMerge.cpp] EXCEPTION: " << e.getMessage() << std::endl;
         return EXIT_FAILURE;
     }
 }
--- simka.orig/src/SimkaPotara.hpp
+++ simka/src/SimkaPotara.hpp
@@ -592,7 +592,7 @@
 		    }
 		    catch (Exception& e)
 		    {
-		    	cout << "\tcan't open config, computing it again" << endl;
+		    	cout << "\t[SimkaPotara.hpp] can't open config, computing it again" << endl;
 		    	System::file().remove(filename);
 		    	createConfig();
 		        return;
--- simka.orig/src/simkaMin/SimkaMin.cpp
+++ simka/src/simkaMin/SimkaMin.cpp
@@ -114,7 +114,7 @@
     }
     catch (Exception& e)
     {
-        std::cout << "EXCEPTION: " << e.getMessage() << std::endl;
+        std::cout << "[SimkaMin.cpp] EXCEPTION: " << e.getMessage() << std::endl;
         return EXIT_FAILURE;
     }
 
--- simka.orig/src/SimkaPotara.cpp
+++ simka/src/SimkaPotara.cpp
@@ -155,7 +155,7 @@
     }
     catch (Exception& e)
     {
-        std::cout << "EXCEPTION: " << e.getMessage() << std::endl;
+        std::cout << "[SimkaPotara.cpp] EXCEPTION: " << e.getMessage() << std::endl;
         return EXIT_FAILURE;
     }