216 | | if (! ("".equals(bugReport.email().get()) || "".equals(bugReport.userExplanation().get())) ) { |
217 | | try { |
218 | | sendReport(bugReport); |
219 | | closeBugReportForm(bugReportForm); |
220 | | } catch (Exception e) { |
221 | | SophieLog.error("Error sending report.", e); |
222 | | DialogUtils.showErrorDialog(null, |
223 | | "The bug report could not be sent", "Error"); |
224 | | } |
| 216 | if ("".equals(bugReport.email().get())) { |
| 217 | DialogUtils.showErrorDialog(bugReportForm.swingComponent().get(), |
| 218 | "Valid e-mail address is mandatory.", "Error"); |
| 219 | return false; |
| 220 | } |
| 221 | if ("".equals(bugReport.userExplanation().get())) { |
| 222 | DialogUtils.showErrorDialog(bugReportForm.swingComponent().get(), |
| 223 | "User explanation is mandatory.", "Error"); |
| 224 | return false; |
| 225 | } |
| 226 | try { |
| 227 | sendReport(bugReport); |
| 228 | closeBugReportForm(bugReportForm); |
| 229 | } catch (Exception e) { |
| 230 | SophieLog.error("Error sending report.", e); |
| 231 | DialogUtils.showErrorDialog(null, |
| 232 | "The bug report could not be sent", "Error"); |
| 233 | } |