BlueBrain / nmodl

Code Generation Framework For NEURON MODeling Language
https://bluebrain.github.io/nmodl/
Apache License 2.0
57 stars 15 forks source link

Print more information on failure. #1441

Closed 1uc closed 2 months ago

1uc commented 2 months ago

Currently, on failure it will output:

terminate called after throwing an instance of 'std::runtime_error'
  what():  NMODL Parser Error : syntax error, unexpected / [Location : 1.40]
---------------------------------------^

but it's entirely unclear what it was processing when it crashed. It's also not obvious from the surrounding context when building NEURON.

This PR changes it such that we have:

[FATAL] NMODL encountered an unhandled exception.
    nmodl Aradi_CadepK.mod --neuron -o build/test/nrnivmodl/53c4/x86_64

followed by the exception.