Skip to content

Print exceptions on one line #1580

@bgoodri

Description

@bgoodri

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.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions