Hide a wrong warning if an Exception is thrown