[Phylobase-commits] r813 - pkg/src
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed Oct 27 15:53:13 CEST 2010
Author: francois
Date: 2010-10-27 15:53:13 +0200 (Wed, 27 Oct 2010)
New Revision: 813
Modified:
pkg/src/GetNCL.cpp
Log:
catch more exceptions with GetNCL
Modified: pkg/src/GetNCL.cpp
===================================================================
--- pkg/src/GetNCL.cpp 2010-09-07 21:45:40 UTC (rev 812)
+++ pkg/src/GetNCL.cpp 2010-10-27 13:53:13 UTC (rev 813)
@@ -164,6 +164,11 @@
Rcpp::List res = Rcpp::List::create(Rcpp::Named("ErrorMsg") = errorMsg);
return res;
}
+ catch (...) {
+ errorMsg = "Unknown error, check the formatting of your file first.";
+ Rcpp::List res = Rcpp::List::create(Rcpp::Named("ErrorMsg") = errorMsg);
+ return res;
+ }
const unsigned nTaxaBlocks = nexusReader.GetNumTaxaBlocks();
for (unsigned t = 0; t < nTaxaBlocks; ++t) {
@@ -179,8 +184,6 @@
taxaNames.push_back (taxaBlock->GetTaxonLabel(j));
}
-
-
/* Get trees */
if (returnTrees) {
if (nTreesBlocks == 0) {
More information about the Phylobase-commits
mailing list