Skip to content

Commit

Permalink
add better error message for getArma
Browse files Browse the repository at this point in the history
  • Loading branch information
armstrtw committed Apr 27, 2012
1 parent 9c60d7c commit 6ae4ff3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/interface.cpp
Expand Up @@ -307,7 +307,13 @@ ArmaContext* getArma(SEXP x_) {
}
break;
default:
throw std::logic_error("ERROR: conversion not supported.");
std::stringstream error_ss;
error_ss << "ERROR: (getArma) conversion not supported ";
error_ss << "TYPEOF: " << TYPEOF(x_);
// if(PRINTNAME(x_) != R_NilValue) {
// error_ss << "variable: " << CHAR(PRINTNAME(x_));
// }
throw std::logic_error(error_ss.str());
}
return ap;
}
Expand Down

0 comments on commit 6ae4ff3

Please sign in to comment.