X-Git-Url: https://code.wpia.club/?p=gigi.git;a=blobdiff_plain;f=src%2Forg%2Fcacert%2Fgigi%2Fpages%2Fwot%2FAssurePage.java;fp=src%2Forg%2Fcacert%2Fgigi%2Fpages%2Fwot%2FAssurePage.java;h=e0cb4a211e57aed40125df653ee99a163283807e;hp=94c582f220e5765f19c3d2d2d7d05d8182646d9c;hb=2f50dbb24105e6345329b8e9ecb5ef4d67ab2a8c;hpb=253ecf13e1a697a657550090de3f3bf054559ad8 diff --git a/src/org/cacert/gigi/pages/wot/AssurePage.java b/src/org/cacert/gigi/pages/wot/AssurePage.java index 94c582f2..e0cb4a21 100644 --- a/src/org/cacert/gigi/pages/wot/AssurePage.java +++ b/src/org/cacert/gigi/pages/wot/AssurePage.java @@ -54,14 +54,18 @@ public class AssurePage extends Page { PrintWriter out = resp.getWriter(); if (req.getParameter("search") == null) { AssuranceForm form = Form.getForm(req, AssuranceForm.class); - if (form.submit(out, req)) { - out.println(translate(req, "Assurance complete.")); - } else { + try { + if (form.submit(out, req)) { + out.println(translate(req, "Assurance complete.")); + return; + } + } catch (GigiApiException e) { + e.format(out, Page.getLanguage(req)); try { Notary.checkAssuranceIsPossible(LoginPage.getUser(req), form.getAssuree()); form.output(out, getLanguage(req), new HashMap()); - } catch (GigiApiException e) { - e.format(out, Page.getLanguage(req)); + } catch (GigiApiException e1) { + e1.format(out, Page.getLanguage(req)); } } @@ -97,10 +101,9 @@ public class AssurePage extends Page { } } } else { - out.print("
"); - - out.println(translate(req, "I'm sorry, there was no email and date of birth matching" + " what you entered in the system. Please double check" + " your information.")); - out.print("
"); + GigiApiException e = new GigiApiException("I'm sorry, there was no email and date of birth matching" // + + " what you entered in the system. Please double check your information."); + e.format(out, getLanguage(req)); } }