Improve handling of try-catch blocks of 'cta::exception::Exception'
Our handling of exceptions inside the CTA code could be improved. Here we have a list of related issues produced by sonarcloud:
An important change to do is replacing the throwing/catching of cta::exception::Exception
by more meaningful exceptions.
And whenever catching cta::exception::Exception
is useful (ex. at the top of a thread/process stack before letting the thread/process fail), we should guarantee that the backtrace is printed.
Otherwise, we will loose important information on what actually caused that exception and not be able to debug properly.
For example, here we had a bug where this backtrace info would have been very useful but did not exist: