spark dataframe exception handling