def process_item(...):
try:
#some hacking
#...
#lots of buggy code
except Exception as e:
#do logging
#record complete/incomplete state
Yes I know that I should generally intercept specific exceptions. But if the code is applied to many items which come from input data. So there might be unpredictable errors. Programming errors are also possible. I have special mechanisms to log/report error states. I don't want to stop the overall process on an unexpected error, whichever the error nature is. I rather want to process as many items as possible. Can I catch base Exception as in above?