Adding error to exception