Advertisement
Guest User

Untitled

a guest
Jan 19th, 2013
25
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.83 KB | None | 0 0
  1. /**
  2. * The contents of this file are subject to the OpenMRS Public License
  3. * Version 1.0 (the "License"); you may not use this file except in
  4. * compliance with the License. You may obtain a copy of the License at
  5. * http://license.openmrs.org
  6. *
  7. * Software distributed under the License is distributed on an "AS IS"
  8. * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
  9. * License for the specific language governing rights and limitations
  10. * under the License.
  11. *
  12. * Copyright (C) OpenMRS, LLC. All Rights Reserved.
  13. */
  14. package org.openmrs.api;
  15.  
  16. /**
  17. * Represents often fatal errors that occur within validation
  18. * that is thrown when a validation errors are found by ValidateUtil.validate() method,
  19. */
  20. public class ValidationException extends APIException {
  21.  
  22. /**
  23. * Default empty constructor. If at all possible, don't use this one, but use the
  24. */
  25. public ValidationException() {
  26. }
  27.  
  28. /**
  29. * General constructor to give the end user a helpful message that relates to why this error
  30. * occurred.
  31. *
  32. * @param message helpful message string for the end user
  33. */
  34. public ValidationException(String message) {
  35. super(message);
  36. }
  37.  
  38. /**
  39. * General constructor to give the end user a helpful message and to also propagate the parent
  40. * error exception message.
  41. *
  42. * @param message helpful message string for the end user
  43. * @param cause the parent exception cause that this ValidationException is wrapping around
  44. */
  45. public ValidationException(String message, Throwable cause) {
  46. super(message, cause);
  47. }
  48.  
  49. /**
  50. * Constructor used to simply chain a parent exception cause to an ValidationException.
  51. *
  52. * @param cause the parent exception cause that this ValidationException is wrapping around
  53. */
  54. public ValidationException(Throwable cause) {
  55. super(cause);
  56. }
  57. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement