Handling correctly all the throwed exceptions