ska-telescope / lmc-base-classes

LMC Base Classes Software Development Kit Project
BSD 3-Clause "New" or "Revised" License
3 stars 4 forks source link

catch all exceptions is not a viable solution #105

Closed flyingfrog81 closed 5 years ago

flyingfrog81 commented 5 years ago

https://github.com/ska-telescope/lmc-base-classes/blob/41579b8b872fc5c046b1a02fe069f048f59c08b1/skabase/SKABaseDevice/SKABaseDevice.py#L64

I don't think this is an appropriate solution. 1) Only the relevant execption should be caught. 2) It would be better to have a try...except only around logging initialization 3) The except should provide a fallback solution, a print statement is not solving the issue. Ideally the fallback should be to initiate logging on a file instead of using rsyslog.

adityadangeska commented 5 years ago

Added exception handling wherever applicable. PR#113 addresses this.