Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Surface error in calculating the correction #24

Open
ckittl opened this issue Nov 24, 2021 · 0 comments
Open

Surface error in calculating the correction #24

ckittl opened this issue Nov 24, 2021 · 0 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@ckittl
Copy link
Member

ckittl commented Nov 24, 2021

val correction: Option[DenseVector[Double]] =
scala.util.control.Exception.allCatch.withTry {
jacobianMatrix \ deviation
} match {
case Success(correction) => Some(correction)
case Failure(exception) =>
logger.error("Error while solving jacobian matrix: {}", exception)
None
}

  • Use Try instead of Option to be able to surface the error
  • Try to enrich the error message, as in case of an singularity failure, the output is not really comprehensive
@ckittl ckittl added the bug Something isn't working label Nov 24, 2021
@ckittl ckittl added this to the Version 2.0 milestone Nov 24, 2021
@ckittl ckittl self-assigned this Nov 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant