ui/ui/src/main/java/com/squareup/subzero/ncipher/NCipherLoadOCS.java
public boolean errorCallBack(String reason, String code, String message) {
    if (code.equals("PhysTokenNotPresent")) {
      try {
        screens.promptForOperatorCard("Please insert Operator Card and then hit <enter>");
      } catch (IOException e) {
        throw new RuntimeException(e);
      }
      return false;
    }
    if (code.equals("IncorrectToken")) {
      System.out.println("Incorrect card. Please remove card and insert OCS. Hit <enter>.");
      try {
        screens.promptForOperatorCard("Incorrect card. Please insert correct Operator Card. Hit <enter>.");
      } catch (IOException e) {
        throw new RuntimeException(e);
      }
      return false;
    }
    if(this.userEnteredPassword) {
      this.passwordPrompt = "Incorrect password. Enter Operator Card password";
    }
    // clear defaultPassword so we prompt for a password on the console.
    this.defaultPassword = null;
    requirePasswordChange = false;
    return false;
  }
/**
   * Sample values for var1, var2 and var3:
   * "card", "DecryptFailed", "Error whilst trying to load the card: DecryptFailed"
   *
   * If we don't throw an exception, the underlying code will automatically prompt for the password
   * again.
   *
   * Return true to abort or false to prompt for the password again.
   */


If we don't throw an exception, the underlying code will automatically prompt for the password
again.

Return true to abort or false to prompt for the password again.
If we don ' t throw an exception the underlying code will automatically prompt for the password again . Return true to abort or false to prompt for the password again .
public boolean errorCallBack(String reason, String code, String message) {
    if (code.equals("PhysTokenNotPresent")) {
      try {
        screens.promptForOperatorCard("Please insert Operator Card and then hit <enter>");
      } catch (IOException e) {
        throw new RuntimeException(e);
      }
      return false;
    }
    if (code.equals("IncorrectToken")) {
      System.out.println("Incorrect card. Please remove card and insert OCS. Hit <enter>.");
      try {
        screens.promptForOperatorCard("Incorrect card. Please insert correct Operator Card. Hit <enter>.");
      } catch (IOException e) {
        throw new RuntimeException(e);
      }
      return false;
    }
    if(this.userEnteredPassword) {
      this.passwordPrompt = "Incorrect password. Enter Operator Card password";
    }
    this.defaultPassword = null;
    requirePasswordChange = false;
    return false;
  }
public boolean errorCallBack ( String reason , String code , String message ) { if ( code . equals ( "PhysTokenNotPresent" ) ) { try { screens . promptForOperatorCard ( "Please insert Operator Card and then hit <enter>" ) ; } catch ( IOException e ) { throw new RuntimeException ( e ) ; } return false ; } if ( code . equals ( "IncorrectToken" ) ) { System . out . println ( "Incorrect card. Please remove card and insert OCS. Hit <enter>." ) ; try { screens . promptForOperatorCard ( "Incorrect card. Please insert correct Operator Card. Hit <enter>." ) ; } catch ( IOException e ) { throw new RuntimeException ( e ) ; } return false ; } if ( this . userEnteredPassword ) { this . passwordPrompt = "Incorrect password. Enter Operator Card password" ; } this . defaultPassword = null ; requirePasswordChange = false ; return false ; }
Sample values for var1, var2 and var3:
 "card", "DecryptFailed", "Error whilst trying to load the card: DecryptFailed"
Sample values for var1 var2 and var3 : " card " " DecryptFailed " " Error whilst trying to load the card : DecryptFailed "
// clear defaultPassword so we prompt for a password on the console.