Skip to content

Commit

Permalink
Merge pull request #213 from stan-dev/feature/unify_write_error_msg
Browse files Browse the repository at this point in the history
Unify the format of the write_error_msg
  • Loading branch information
syclik committed Nov 16, 2013
2 parents 75f76ce + 7801d8c commit 0db5d11
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
5 changes: 3 additions & 2 deletions src/stan/gm/command.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,10 @@ namespace stan {
<< "rejected becuase of the following issue:"
<< std::endl
<< e.what() << std::endl
<< "If this warning occurs sporadically then the sampler is fine,"
<< "If this warning occurs sporadically, such as for highly constrained "
<< "variable types like covariance matrices, then the sampler is fine,"
<< std::endl
<< "but if this warning occurs often then your model is either severely "
<< "but if this warning occurs often then your model may be either severely "
<< "ill-conditioned or misspecified."
<< std::endl;

Expand Down
17 changes: 8 additions & 9 deletions src/stan/mcmc/hmc/hamiltonians/base_hamiltonian.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,15 @@ namespace stan {
if (!error_msgs) return;

*error_msgs << std::endl
<< "Informational Message: The parameter state is about to be Metropolis"
<< " rejected due to the following underlying, non-fatal (really)"
<< " issue (and please ignore that what comes next might say 'error'): "
<< e.what()
<< "Informational Message: The current Metropolis proposal is about to be "
<< "rejected becuase of the following issue:"
<< std::endl
<< "If the problem persists across multiple draws, you might have"
<< " a problem with an initial state or a gradient somewhere."
<< e.what() << std::endl
<< "If this warning occurs sporadically, such as for highly constrained "
<< "variable types like covariance matrices, then the sampler is fine,"
<< std::endl
<< " If the problem does not persist, the resulting samples will still"
<< " be drawn from the posterior."
<< "but if this warning occurs often then your model may be either severely "
<< "ill-conditioned or misspecified."
<< std::endl;

}
Expand All @@ -89,6 +88,6 @@ namespace stan {
} // mcmc

} // stan


#endif

0 comments on commit 0db5d11

Please sign in to comment.