catch exception from bad data