[med-svn] [Git][med-team/simka][master] Patch to display originating error for easier diagnostic.

Shayan Doust gitlab at salsa.debian.org
Fri Sep 13 21:59:53 BST 2019



Shayan Doust pushed to branch master at Debian Med / simka


Commits:
1a14c59a by Shayan Doust at 2019-09-13T07:30:28Z
Patch to display originating error for easier diagnostic.

- - - - -


3 changed files:

- + debian/patches/detailed_errors.patch
- debian/patches/fix_test_path.patch
- debian/patches/series


Changes:

=====================================
debian/patches/detailed_errors.patch
=====================================
@@ -0,0 +1,119 @@
+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 at shayandoust.me>
+Last-Update: 2019-09-13
+---
+
+Index: simka/src/core/main.cpp
+===================================================================
+--- simka.orig/src/core/main.cpp	2019-09-13 08:27:17.191648329 +0100
++++ simka/src/core/main.cpp	2019-09-13 08:27:17.187648345 +0100
+@@ -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;
+     }
+ 
+Index: simka/src/core/SimkaAlgorithm.cpp
+===================================================================
+--- simka.orig/src/core/SimkaAlgorithm.cpp	2019-09-13 08:27:17.191648329 +0100
++++ simka/src/core/SimkaAlgorithm.cpp	2019-09-13 08:27:17.187648345 +0100
+@@ -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;
+ 		}
+ 
+Index: simka/src/core/SimkaCommons.hpp
+===================================================================
+--- simka.orig/src/core/SimkaCommons.hpp	2019-09-13 08:27:17.191648329 +0100
++++ simka/src/core/SimkaCommons.hpp	2019-09-13 08:27:17.187648345 +0100
+@@ -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;
+ 			}
+ 
+Index: simka/src/SimkaCount.cpp
+===================================================================
+--- simka.orig/src/SimkaCount.cpp	2019-09-13 08:27:17.191648329 +0100
++++ simka/src/SimkaCount.cpp	2019-09-13 08:27:17.187648345 +0100
+@@ -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;
+     }
+ }
+Index: simka/src/SimkaMerge.cpp
+===================================================================
+--- simka.orig/src/SimkaMerge.cpp	2019-09-13 08:27:17.191648329 +0100
++++ simka/src/SimkaMerge.cpp	2019-09-13 08:27:17.187648345 +0100
+@@ -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;
+     }
+ }
+Index: simka/src/SimkaPotara.hpp
+===================================================================
+--- simka.orig/src/SimkaPotara.hpp	2019-09-13 08:27:17.191648329 +0100
++++ simka/src/SimkaPotara.hpp	2019-09-13 08:27:17.187648345 +0100
+@@ -572,7 +572,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;
+Index: simka/src/simkaMin/SimkaMin.cpp
+===================================================================
+--- simka.orig/src/simkaMin/SimkaMin.cpp	2019-09-13 08:27:17.191648329 +0100
++++ simka/src/simkaMin/SimkaMin.cpp	2019-09-13 08:27:17.187648345 +0100
+@@ -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;
+     }
+ 
+Index: simka/src/SimkaPotara.cpp
+===================================================================
+--- simka.orig/src/SimkaPotara.cpp	2019-09-13 08:27:17.191648329 +0100
++++ simka/src/SimkaPotara.cpp	2019-09-13 08:27:17.187648345 +0100
+@@ -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;
+     }
+ 


=====================================
debian/patches/fix_test_path.patch
=====================================
@@ -5,8 +5,8 @@ Last-Update: 2019-09-13
 
 Index: simka/tests/simkaMin/test_simkaMin.py
 ===================================================================
---- simka.orig/tests/simkaMin/test_simkaMin.py	2019-09-13 07:39:12.023233040 +0100
-+++ simka/tests/simkaMin/test_simkaMin.py	2019-09-13 07:39:12.019233056 +0100
+--- simka.orig/tests/simkaMin/test_simkaMin.py	2019-09-13 08:06:40.164613706 +0100
++++ simka/tests/simkaMin/test_simkaMin.py	2019-09-13 08:06:40.160613722 +0100
 @@ -48,7 +48,7 @@
              for nb_reads in NB_READS:
                  for nb_kmers in NB_KMERS:
@@ -74,8 +74,8 @@ Index: simka/tests/simkaMin/test_simkaMin.py
              if ret != 0: exit(1)
 Index: simka/tests/simple_test.py
 ===================================================================
---- simka.orig/tests/simple_test.py	2019-09-13 07:39:12.023233040 +0100
-+++ simka/tests/simple_test.py	2019-09-13 07:40:08.951004314 +0100
+--- simka.orig/tests/simple_test.py	2019-09-13 08:06:40.164613706 +0100
++++ simka/tests/simple_test.py	2019-09-13 08:06:40.160613722 +0100
 @@ -91,7 +91,7 @@
  #test k=31 t=0
  clear()
@@ -126,8 +126,8 @@ Index: simka/tests/simple_test.py
  
 Index: simka/example/simple_test.sh
 ===================================================================
---- simka.orig/example/simple_test.sh	2019-09-13 07:39:12.023233040 +0100
-+++ simka/example/simple_test.sh	2019-09-13 07:39:12.019233056 +0100
+--- simka.orig/example/simple_test.sh	2019-09-13 08:06:40.164613706 +0100
++++ simka/example/simple_test.sh	2019-09-13 08:07:06.216509113 +0100
 @@ -3,19 +3,19 @@
  
  # look for simka binary. In devel mode, it's in ../build/bin directory.
@@ -156,7 +156,7 @@ Index: simka/example/simple_test.sh
 +bindir="/usr/bin"
  # run simka
 -command="$bindir/simka -in ../example/simka_input.txt -out ./simka_results/ -out-tmp ./simka_temp_output"
-+command="$bindir/simka -in simka_input.txt -out ./simka_results/ -out-tmp ./simka_temp_output"
++command="simka -in simka_input.txt -out ./simka_results/ -out-tmp ./simka_temp_output"
  #printf "$command\n\n"
  
  # DO NOT add lines between '$command' exec and 'var...' !


=====================================
debian/patches/series
=====================================
@@ -1,3 +1,4 @@
+detailed_errors.patch
 fix_test_path.patch
 2to3.patch
 use_debian_packaged_libraries.patch



View it on GitLab: https://salsa.debian.org/med-team/simka/commit/1a14c59a82bea04af0e3ca35202362988a3fa5bd

-- 
View it on GitLab: https://salsa.debian.org/med-team/simka/commit/1a14c59a82bea04af0e3ca35202362988a3fa5bd
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20190913/d7e3612c/attachment-0001.html>


More information about the debian-med-commit mailing list