stan icon indicating copy to clipboard operation
stan copied to clipboard

Print exceptions on one line

Open bgoodri opened this issue 10 years ago • 1 comments

Currently, the output looks like

> cat(unique(hmm), sep = "\n")
Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:
Exception thrown at line 306:
stan::math::normal_log: Location parameter[1] is -nan, but must be finite!
If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,
but if this warning occurs often then your model may be either severely ill-conditioned or misspecified.

This makes it difficult to filter the unique exceptions because the "Exception thrown at line 306" is on a different line than "stan::math::normal_log: Location parameter[1] is -nan, but must be finite!". I'm going to do a one-line PR in a second that puts those two things onto the same line.

bgoodri avatar Aug 09 '15 02:08 bgoodri

#1581 fixed a bit of this. The discussion has some more instances we need to fix.

syclik avatar Aug 17 '15 23:08 syclik