[Misc] Fix exception handling and error reporting which were not following our practices