  
      def __init__(self, *args, **kwargs):
          try:
              self.view_name = kwargs.pop('view_name')
          except:
              raise ValueError("Hyperlinked field requires 'view_name' kwarg")
  
          self.slug_field = kwargs.pop('slug_field', self.slug_field)
          default_slug_kwarg = self.slug_url_kwarg or self.slug_field
          self.pk_url_kwarg = kwargs.pop('pk_url_kwarg', self.pk_url_kwarg)
 
</s> remove         except:
 </s> add         except KeyError: </s> remove             except:
 </s> add             except Exception: </s> remove         except:
 </s> add         except NoReverseMatch: </s> remove         except:
 </s> add         except Exception: </s> remove         except:
 </s> add         except Exception:
        except KeyError:
  
      def __init__(self, *args, **kwargs):
          try:
              self.view_name = kwargs.pop('view_name')
        except KeyError:
              raise ValueError("Hyperlinked field requires 'view_name' kwarg")
  
          self.slug_field = kwargs.pop('slug_field', self.slug_field)
          default_slug_kwarg = self.slug_url_kwarg or self.slug_field
          self.pk_url_kwarg = kwargs.pop('pk_url_kwarg', self.pk_url_kwarg)
keep keep keep keep replace keep keep keep keep keep
 Purge naked excepts.

Most of these had obvious exceptions which would be thrown. Some I'm not
sure about but they should at least catch only Exception so as not to
ignore SystemExit and other inappropriate Error classes. 
rest_framework/relations.py