Uploaded image for project: 'JTalks Common'
  1. JTalks Common
  2. JTALKSCOMMON-15

Change such exceptions as DuplicateException to have Constructor accepting the wrong field instead of whole error message

VotersWatchers
    XMLWordPrintable

    Details

      Description

      So instead of having

        /**
           * Create exception with specific message.
           *
           * @param message exception message
           */
          public DuplicateEmailException(String message) {
              super(message);
          }

      We need this style of exceptions:

          public DuplicateEmailException(String email) {
              this.email = email;
              super("Email is duplicated [" + email + "]");
          }

      If you think that user should be allowed to pass a custom error message, then such constructor should be created:

      public DuplicateEmailException(String email, String errorMessage)

        Attachments

          Structure

            Activity

              People

              • Assignee:
                ancient_mariner Alex Lysak
                Reporter:
                ctapobep Stanislav Bashkyrtsev
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 3h Original Estimate - 3h
                  3h
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 6h
                  6h

                    Structure Helper Panel