Open LukasNickel opened 2 years ago
This should catch an exception and print the message.
No, it should just raise! "Silently" ignoring that a user specified config file could not be loaded is not ok and will lead to unexpected results since nobody reads log files of successful jobs...
The try...except block in the dl1_to_dl2 script is broken: https://github.com/cta-observatory/cta-lstchain/blob/089f641dc1614e3ae5cd6358ff2aab7f0da58b48/lstchain/scripts/lstchain_dl1_to_dl2.py#L80
This should catch an exception and print the message. Currently it rightfully throws an error:
TypeError: catching classes that do not inherit from BaseException is not allowed
. when handling the underlying exception.The script runs fine if there is no error and fails if there is one. Its just that there is an additional non helpful error message printed.