Implement error output if Assurance failed internally.
authorFelix Dörre <felix@dogcraft.de>
Fri, 27 Jun 2014 16:15:21 +0000 (18:15 +0200)
committerFelix Dörre <felix@dogcraft.de>
Fri, 27 Jun 2014 16:15:21 +0000 (18:15 +0200)
src/org/cacert/gigi/pages/wot/AssuranceForm.java

index 056a28ab6963714cc5ce0ee5a2222ea10e31991f..498cd6ad7ed324844394c1963be85a44bed4b01b 100644 (file)
@@ -90,19 +90,25 @@ public class AssuranceForm extends Form {
                        // TODO message
                        failed = true;
                }
-               out.println("</div>");
                if (failed) {
+                       out.println("</div>");
                        return false;
                }
                try {
                        boolean success = Notary.assure(LoginPage.getUser(req), assuree,
                                        Integer.parseInt(req.getParameter("points")),
                                        req.getParameter("location"), req.getParameter("date"));
+                       if (!success) {
+                               outputError(out, req,
+                                               "Assurance failed. Maybe user data changed.");
+                       }
+                       out.println("</div>");
                        return success;
                } catch (SQLException e) {
                        e.printStackTrace();
                }
 
+               out.println("</div>");
                return false;
        }
 }