public AccessibilityViewCheckException(List<AccessibilityViewCheckResult> results,AccessibilityCheckResultDescriptor resultDescriptor){
  super();
  if (results == null || results.isEmpty()) {
    throw new IllegalArgumentException("AccessibilityViewCheckException requires at least 1 AccessibilityViewCheckResult");
  }
  if (resultDescriptor == null) {
    throw new IllegalArgumentException("Result descriptor cannot be null");
  }
  this.results=results;
  this.resultDescriptor=resultDescriptor;
}

public AccessibilityViewCheckException ( List < AccessibilityViewCheckResult > results , AccessibilityCheckResultDescriptor resultDescriptor ) { super ( ) ; if ( results == null || results . isEmpty ( ) ) { throw new IllegalArgumentException ( "AccessibilityViewCheckException requires at least 1 AccessibilityViewCheckResult" ) ; } if ( resultDescriptor == null ) { throw new IllegalArgumentException ( "Result descriptor cannot be null" ) ; } this . results = results ; this . resultDescriptor = resultDescriptor ; }
create an exception with results and a result descriptor to generate the message .
