You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

InvalidPatternException.java 1.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /*
  2. * Copyright (C) 2008, Florian Köberle <florianskarten@web.de>
  3. * Copyright (C) 2009, Vasyl' Vavrychuk <vvavrychuk@gmail.com> and others
  4. *
  5. * This program and the accompanying materials are made available under the
  6. * terms of the Eclipse Distribution License v. 1.0 which is available at
  7. * https://www.eclipse.org/org/documents/edl-v10.php.
  8. *
  9. * SPDX-License-Identifier: BSD-3-Clause
  10. */
  11. package org.eclipse.jgit.errors;
  12. /**
  13. * Thrown when a pattern passed in an argument was wrong.
  14. */
  15. public class InvalidPatternException extends Exception {
  16. private static final long serialVersionUID = 1L;
  17. private final String pattern;
  18. /**
  19. * Constructor for InvalidPatternException
  20. *
  21. * @param message
  22. * explains what was wrong with the pattern.
  23. * @param pattern
  24. * the invalid pattern.
  25. */
  26. public InvalidPatternException(String message, String pattern) {
  27. super(message);
  28. this.pattern = pattern;
  29. }
  30. /**
  31. * Constructor for InvalidPatternException
  32. *
  33. * @param message
  34. * explains what was wrong with the pattern.
  35. * @param pattern
  36. * the invalid pattern.
  37. * @param cause
  38. * the cause.
  39. * @since 4.10
  40. */
  41. public InvalidPatternException(String message, String pattern,
  42. Throwable cause) {
  43. this(message, pattern);
  44. initCause(cause);
  45. }
  46. /**
  47. * Get the invalid pattern
  48. *
  49. * @return the invalid pattern.
  50. */
  51. public String getPattern() {
  52. return pattern;
  53. }
  54. }