                  value = '/' + value[len(prefix):]
  
          try:
              match = resolve(value)
          except:
              raise ValidationError(self.error_messages['no_match'])
  
          if match.view_name != self.view_name:
              raise ValidationError(self.error_messages['incorrect_match'])
  
 
</s> remove             except:
 </s> add             except Exception: </s> remove         except:
 </s> add         except Exception: </s> remove         except:
 </s> add         except KeyError: </s> remove         except:
 </s> add         except KeyError: </s> remove         except:
 </s> add         except Exception:
        except Exception:
                  value = '/' + value[len(prefix):]
  
          try:
              match = resolve(value)
        except Exception:
              raise ValidationError(self.error_messages['no_match'])
  
          if match.view_name != self.view_name:
              raise ValidationError(self.error_messages['incorrect_match'])
  
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