-
Notifications
You must be signed in to change notification settings - Fork 15
Error Messages
Jon Drobny edited this page May 24, 2023
·
5 revisions
RustBCA uses the anyhow crate to add context to error messages produced by the code so that the cause of the error can be located by and explained to the user. For example, if the absolute tolerance of the CPR rootfinder is set too fine, the code will produce the following error message:
Processing 20 ions...
Initializing with 8 threads...
[00:00:00] [####>-----------------------------------] 10%
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: Numerical error: CPR Rootfinder failed to converge when calculating distance of closest approach for Er = 1881.4633630066912 eV p = 0.6377656515934431 A using Morse potential with D = 0.14655064898407008 eV, alpha = 1.1836 1/A, and r0 = 3.73 A.
Caused by:
Subdivision reached interval limit without converging. Consider relaxing epsilon or increasing N_max. F(a) = -0.569812751852526 F(b) = 0.9999999999999999
If you encounter an error message that you do not understand or need help resolving, please open an issue and fill out the issue template for bugs.
- Numerical error: a floating point error. Typically caused by syntactically correct but physically incorrect values, such as energies given in J when eV is the specified energy unit.
- Input error: error parsing or handling input values.
- Geometry error: error in evaluating quantities associated with geometry; usually indicates something is wrong with the geometry input.
- Output error: error in printing output files.