View Javadoc
1   package com.atlassian.plugin.util.validation;
2   
3   import com.atlassian.plugin.PluginParseException;
4   import com.google.common.collect.ImmutableList;
5   
6   import java.util.List;
7   
8   import static com.google.common.base.Preconditions.checkNotNull;
9   
10  /**
11   * Exception for a validation error parsing DOM4J nodes
12   *
13   * @since 2.2.0
14   */
15  public class ValidationException extends PluginParseException {
16      private final List<String> errors;
17  
18      public ValidationException(String msg, List<String> errors) {
19          super(msg);
20          this.errors = ImmutableList.copyOf(checkNotNull(errors));
21      }
22  
23      /**
24       * @return a list of the original errors
25       */
26      public List<String> getErrors() {
27          return errors;
28      }
29  }