gallery upload exceptions catch