Logga l'eccezione nel trycatch per verificare che errori restituisce.