2
0

LogicException.hx 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /*
  2. * Copyright (C)2005-2019 Haxe Foundation
  3. *
  4. * Permission is hereby granted, free of charge, to any person obtaining a
  5. * copy of this software and associated documentation files (the "Software"),
  6. * to deal in the Software without restriction, including without limitation
  7. * the rights to use, copy, modify, merge, publish, distribute, sublicense,
  8. * and/or sell copies of the Software, and to permit persons to whom the
  9. * Software is furnished to do so, subject to the following conditions:
  10. *
  11. * The above copyright notice and this permission notice shall be included in
  12. * all copies or substantial portions of the Software.
  13. *
  14. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  17. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  18. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  19. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  20. * DEALINGS IN THE SOFTWARE.
  21. */
  22. package php;
  23. /**
  24. Exception that represents error in the program logic.
  25. This kind of exception should lead directly to a fix in your code.
  26. **/
  27. @:native('LogicException')
  28. extern class LogicException extends Exception {}
  29. /**
  30. Exception thrown if a callback refers to an undefined function
  31. or if some arguments are missing.
  32. **/
  33. @:native('BadFunctionCallException')
  34. extern class BadFunctionCallException extends LogicException {}
  35. /**
  36. Exception thrown if a callback refers to an undefined method
  37. or if some arguments are missing.
  38. **/
  39. @:native('BadMethodCallException')
  40. extern class BadMethodCallException extends BadFunctionCallException {}
  41. /**
  42. Exception thrown if a value does not adhere to a defined valid data domain.
  43. **/
  44. @:native('DomainException')
  45. extern class DomainException extends LogicException {}
  46. /**
  47. Exception thrown if an argument is not of the expected type.
  48. **/
  49. @:native('InvalidArgumentException')
  50. extern class InvalidArgumentException extends LogicException {}
  51. /**
  52. Exception thrown if a length is invalid.
  53. **/
  54. @:native('LengthException')
  55. extern class LengthException extends LogicException {}
  56. /**
  57. Exception thrown when an illegal index was requested.
  58. This represents errors that should be detected at compile time.
  59. **/
  60. @:native('OutOfRangeException')
  61. extern class OutOfRangeException extends LogicException {}