Stan  2.10.0
probability, sampling & optimization
write_error_msg.hpp
Go to the documentation of this file.
1 #ifndef STAN_SERVICES_IO_WRITE_ERROR_MSG_HPP
2 #define STAN_SERVICES_IO_WRITE_ERROR_MSG_HPP
3 
5 #include <ostream>
6 #include <stdexcept>
7 
8 namespace stan {
9  namespace services {
10  namespace io {
11 
19  const std::exception& e) {
20  writer();
21  writer("Informational Message: The current Metropolis"
22  " proposal is about to be rejected because of"
23  " the following issue:");
24  writer(e.what());
25  writer("If this warning occurs sporadically, such as"
26  " for highly constrained variable types like"
27  " covariance matrices, then the sampler is fine,");
28  writer("but if this warning occurs often then your model"
29  " may be either severely ill-conditioned or"
30  " misspecified.");
31  }
32 
33  }
34  }
35 }
36 
37 #endif
void write_error_msg(interface_callbacks::writer::base_writer &writer, const std::exception &e)
Writes a Metropolis rejection message.
Probability, optimization and sampling library.
base_writer is an abstract base class defining the interface for Stan writer callbacks.
Definition: base_writer.hpp:20

     [ Stan Home Page ] © 2011–2016, Stan Development Team.