Author: Michael R. Crusoe
Description: There is a newer version of libjellyfish in Debian, update to
match.
--- salmon.orig/src/merge_files.cc
+++ salmon/src/merge_files.cc
@@ -29,6 +29,8 @@
 #include <jellyfish/rectangular_binary_matrix.hpp>
 #include <jellyfish/cpp_array.hpp>
 
+namespace err = jellyfish::err;
+
 using jellyfish::file_header;
 using jellyfish::RectangularBinaryMatrix;
 using jellyfish::mer_dna;
@@ -96,7 +98,7 @@
   for(size_t i = 0; i < files.size(); i++) {
     files.init(i, input_files[i]);
     if(!files[i].is.good())
-      eraise(MergeError) << "Failed to open input file '" << input_files[i] << "'";
+      throw MergeError(err::msg() << "Failed to open input file '" << input_files[i] << "'");
 
     file_header& h = files[i].header;
     if(i == 0) {
@@ -115,22 +117,22 @@
       out_counter_len = std::min(out_counter_len, h.counter_len());
     } else {
       if(format != h.format())
-        eraise(MergeError) << "Can't merge files with different formats (" << format << ", " << h.format() << ")";
+        throw MergeError(err::msg() << "Can't merge files with different formats (" << format << ", " << h.format() << ")");
       if(h.key_len() != key_len)
-        eraise(MergeError) << "Can't merge hashes of different key lengths (" << key_len << ", " << h.key_len() << ")";
+        throw MergeError(err::msg() << "Can't merge hashes of different key lengths (" << key_len << ", " << h.key_len() << ")");
       if(h.max_reprobe_offset() != max_reprobe_offset)
-        eraise(MergeError) << "Can't merge hashes with different reprobing strategies";
+        throw MergeError(err::msg() << "Can't merge hashes with different reprobing strategies");
       if(h.size() != size)
-        eraise(MergeError) << "Can't merge hash with different size (" << size << ", " << h.size() << ")";
+        throw MergeError(err::msg() << "Can't merge hash with different size (" << size << ", " << h.size() << ")");
       if(h.matrix() != *matrix)
-        eraise(MergeError) << "Can't merge hash with different hash function";
+        throw MergeError(err::msg() << "Can't merge hash with different hash function");
     }
   }
   mer_dna::k(key_len / 2);
 
   std::ofstream out(out_file);
   if(!out.good())
-    eraise(MergeError) << "Can't open out file '" << out_file << "'";
+    throw MergeError(err::msg() << "Can't open out file '" << out_file << "'");
   out_header.format(format);
 
   if(!format.compare(binary_dumper::format)) {
@@ -143,7 +145,7 @@
     text_writer writer;
     do_merge<text_reader, text_writer>(files, out, writer, min, max);
   } else {
-    eraise(MergeError) << "Unknown format '" << format << "'";
+    throw MergeError(err::msg() << "Unknown format '" << format << "'");
   }
   out.close();
 }
--- salmon.orig/src/BuildSalmonIndex.cpp
+++ salmon/src/BuildSalmonIndex.cpp
@@ -21,7 +21,6 @@
 #include "cereal/types/vector.hpp"
 #include "cereal/archives/binary.hpp"
 
-#include "jellyfish/config.h"
 #include "jellyfish/err.hpp"
 #include "jellyfish/misc.hpp"
 #include "jellyfish/jellyfish.hpp"
--- salmon.orig/include/PairSequenceParser.hpp
+++ salmon/include/PairSequenceParser.hpp
@@ -130,9 +130,9 @@
     if(type1 == DONE_TYPE || type2 == DONE_TYPE)
       return open_next_files(st);
     if(type1 != type2)
-      eraise(std::runtime_error) << "Paired files are of different format";
+      throw std::runtime_error("Paired files are of different format");
     if(type1 == ERROR_TYPE || type2 == ERROR_TYPE)
-      eraise(std::runtime_error) << "Unsupported format";
+      throw std::runtime_error("Unsupported format");
     st.type = type1;
   }
 
@@ -165,7 +165,7 @@
       hsq.seq.append(tmp);             // two lines avoiding copying
     }
     if(!is.good())
-      eraise(std::runtime_error) << "Truncated fastq file";
+      throw std::runtime_error("Truncated fastq file");
     is.ignore(std::numeric_limits<std::streamsize>::max(), '\n');
     hsq.qual.clear();
     while(hsq.qual.size() < hsq.seq.size() && is.good()) {
@@ -173,9 +173,9 @@
       hsq.qual.append(tmp);
     }
     if(hsq.qual.size() != hsq.seq.size())
-      eraise(std::runtime_error) << "Invalid fastq file: wrong number of quals";
+      throw std::runtime_error("Invalid fastq file: wrong number of quals");
     if(is.peek() != EOF && is.peek() != '@')
-      eraise(std::runtime_error) << "Invalid fastq file: header missing";
+      throw std::runtime_error("Invalid fastq file: header missing");
 
   }
 
