villano-lab / nrCascadeSim

calculating the NR spectrum resulting from neutron-capture cascades.
MIT License
0 stars 1 forks source link

Bad level input file name results in poor behavior instead of error or warning in "Reading a Level Input File" and `realizeCascades`. #63

Open nuclearGoblin opened 2 years ago

nuclearGoblin commented 2 years ago

I am submitting a bug report.

This bug occurs in: Example for "Reading a Level Input File" in readthedocs.

Expected behavior: The example should throw an error if attempting to reference a file that does not exist.

Current behavior: The exmaple simply hangs instead, giving the user no information.

Steps to reproduce:

  1. Compile the example
  2. Run the example in a directory where the specified file (filename variable) does not exist

Relevant Output: No output.

nuclearGoblin commented 2 years ago

Probably related: realizeCascades outputs an empty file if the levelfile supplied does not exist. Instead, it should probably give an error or warning that it was not able to generate any data.

nuclearGoblin commented 1 year ago

Also likely related: levelfiles with formatting issues cause realizeCascades to run successfully while outputing an empty file.

So far this includes: