RuntimeException.hx 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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 thrown if an error which can only be found on runtime occurs.
  25. **/
  26. @:native('RuntimeException')
  27. extern class RuntimeException extends Exception {}
  28. /**
  29. Exception thrown if a value is not a valid key.
  30. This represents errors that cannot be detected at compile time.
  31. **/
  32. @:native('OutOfBoundsException')
  33. extern class OutOfBoundsException extends RuntimeException {}
  34. /**
  35. Exception thrown when adding an element to a full container.
  36. **/
  37. @:native('OverflowException')
  38. extern class OverflowException extends RuntimeException {}
  39. /**
  40. Exception thrown to indicate range errors during program execution.
  41. Normally this means there was an arithmetic error other than under/overflow.
  42. **/
  43. @:native('RangeException')
  44. extern class RangeException extends RuntimeException {}
  45. /**
  46. Exception thrown when performing an invalid operation on an empty container,
  47. such as removing an element.
  48. **/
  49. @:native('UnderflowException')
  50. extern class UnderflowException extends RuntimeException {}
  51. /**
  52. Exception thrown if a value does not match with a set of values.
  53. Typically this happens when a function calls another function and
  54. expects the return value to be of a certain type or value not including
  55. arithmetic or buffer related errors.
  56. **/
  57. @:native('UnexpectedValueException')
  58. extern class UnexpectedValueException extends RuntimeException {}