Catching exception in get_fields()