]> WPIA git - gigi.git/blobdiff - src/org/cacert/gigi/util/Notary.java
upd: replace assure, assurance, assurer etc in output to user
[gigi.git] / src / org / cacert / gigi / util / Notary.java
index cba93aba8ee78f92a6b40b00252d8bc7c55eaf6b..e1c903e867cf589896790842f88925d9db5e5c92 100644 (file)
@@ -87,7 +87,7 @@ public class Notary {
             throw gae;
         }
         if (date == null || date.equals("")) {
-            gae.mergeInto(new GigiApiException("You must enter the date when you met the assuree."));
+            gae.mergeInto(new GigiApiException("You must enter the date when you met the applicant."));
         } else {
             try {
                 Date d = DateSelector.getDateFormat().parse(date);
@@ -128,7 +128,7 @@ public class Notary {
             }
 
             if ( !assuree.getDoB().equals(dob)) {
-                gae.mergeInto(new GigiApiException("The person you are assuring changed his personal details."));
+                gae.mergeInto(new GigiApiException("The person you are verifying changed his personal details."));
             }
 
             if (awarded < 0) {
@@ -239,6 +239,9 @@ public class Notary {
     }
 
     public synchronized static void assureAll(User assurer, User assuree, DayDate dob, int awarded, String location, String date, AssuranceType type, Name[] toAssure) throws GigiApiException {
+        if (toAssure.length == 0) {
+            throw new GigiApiException("You must confirm at least one name to verify an account.");
+        }
         boolean[] hadLessThan50Points = new boolean[toAssure.length];
         boolean hadTotalLessThan100 = assuree.getAssurancePoints() < 100;
         for (int i = 0; i < toAssure.length; i++) {