2
0

Exceptions.hx 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  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 python;
  23. import haxe.extern.Rest;
  24. @:native("BaseException")
  25. extern class BaseException {
  26. function new(args:Rest<Dynamic>):Void;
  27. }
  28. @:native("BufferError")
  29. extern class BufferError extends BaseException {}
  30. @:native("GeneratorExit")
  31. extern class GeneratorExit extends BaseException {}
  32. @:native("KeyboardInterrupt")
  33. extern class KeyboardInterrupt extends BaseException {}
  34. @:native("Exception")
  35. extern class Exception extends BaseException {}
  36. @:native("SyntaxError")
  37. extern class SyntaxError extends Exception {}
  38. @:native("StopIteration")
  39. extern class StopIteration extends Exception {}
  40. @:native("RuntimeError")
  41. extern class RuntimeError extends Exception {}
  42. @:native("NotImplementedError")
  43. extern class NotImplementedError extends RuntimeError {}
  44. @:native("IndentationError")
  45. extern class IndentationError extends SyntaxError {}
  46. @:native("EnvironmentError")
  47. extern class EnvironmentError extends Exception {}
  48. @:native("OSError")
  49. extern class OSError extends EnvironmentError {}
  50. @:native("BlockingIOError")
  51. extern class BlockingIOError extends OSError {}
  52. @:native("ChildProcessError")
  53. extern class ChildProcessError extends OSError {}
  54. @:native("ConnectionError")
  55. extern class ConnectionError extends OSError {}
  56. @:native("BrokenPipeError")
  57. extern class BrokenPipeError extends ConnectionError {}
  58. @:native("ConnectionAbortedError")
  59. extern class ConnectionAbortedError extends ConnectionError {}
  60. @:native("ConnectionRefusedError")
  61. extern class ConnectionRefusedError extends ConnectionError {}
  62. @:native("ConnectionResetError")
  63. extern class ConnectionResetError extends ConnectionError {}
  64. @:native("FileExistsError")
  65. extern class FileExistsError extends OSError {}
  66. @:native("FileNotFoundError")
  67. extern class FileNotFoundError extends OSError {}
  68. @:native("InterruptedError")
  69. extern class InterruptedError extends OSError {}
  70. @:native("IsADirectoryError")
  71. extern class IsADirectoryError extends OSError {}
  72. @:native("NotADirectoryError")
  73. extern class NotADirectoryError extends OSError {}
  74. @:native("PermissionError")
  75. extern class PermissionError extends OSError {}
  76. @:native("ProcessLookupError")
  77. extern class ProcessLookupError extends OSError {}
  78. @:native("TimeoutError")
  79. extern class TimeoutError extends OSError {}
  80. @:native("NameError")
  81. extern class NameError extends Exception {}
  82. @:native("UnboundLocalError")
  83. extern class UnboundLocalError extends NameError {}
  84. @:native("MemoryError")
  85. extern class MemoryError extends Exception {}
  86. @:native("AssertionError")
  87. extern class AssertionError extends Exception {}
  88. @:native("AttributeError")
  89. extern class AttributeError extends Exception {}
  90. @:native("EOFError")
  91. extern class EOFError extends Exception {}
  92. @:native("ArithmeticError")
  93. extern class ArithmeticError extends Exception {}
  94. @:native("FloatingPointError")
  95. extern class FloatingPointError extends ArithmeticError {}
  96. @:native("OverflowError")
  97. extern class OverflowError extends ArithmeticError {}
  98. @:native("ZeroDivisionError")
  99. extern class ZeroDivisionError extends ArithmeticError {}
  100. @:native("ImportError")
  101. extern class ImportError extends Exception {}
  102. @:native("LookupError")
  103. extern class LookupError extends Exception {}
  104. @:native("IndexError")
  105. extern class IndexError extends LookupError {}
  106. @:native("KeyError")
  107. extern class KeyError extends LookupError {}
  108. @:native("IOError")
  109. extern class IOError extends EnvironmentError {}
  110. @:native("VMSError")
  111. extern class VMSError extends OSError {}
  112. @:native("WindowsError")
  113. extern class WindowsError extends OSError {}
  114. @:native("ValueError")
  115. extern class ValueError extends Exception {}
  116. @:native("UnicodeError")
  117. extern class UnicodeError extends ValueError {}
  118. @:native("UnicodeDecodeError")
  119. extern class UnicodeDecodeError extends UnicodeError {}
  120. @:native("UnicodeEncodeError")
  121. extern class UnicodeEncodeError extends UnicodeError {}
  122. @:native("UnicodeTranslateError")
  123. extern class UnicodeTranslateError extends UnicodeError {}
  124. @:native("Warning")
  125. extern class Warning extends Exception {}
  126. @:native("DeprecationWarning")
  127. extern class DeprecationWarning extends Warning {}
  128. @:native("PendingDeprecationWarning")
  129. extern class PendingDeprecationWarning extends Warning {}
  130. @:native("RuntimeWarning")
  131. extern class RuntimeWarning extends Warning {}
  132. @:native("SyntaxWarning")
  133. extern class SyntaxWarning extends Warning {}
  134. @:native("UserWarning")
  135. extern class UserWarning extends Warning {}
  136. @:native("FutureWarning")
  137. extern class FutureWarning extends Warning {}
  138. @:native("ImportWarning")
  139. extern class ImportWarning extends Warning {}
  140. @:native("UnicodeWarning")
  141. extern class UnicodeWarning extends Warning {}
  142. @:native("BytesWarning")
  143. extern class BytesWarning extends Warning {}
  144. @:native("ResourceWarning")
  145. extern class ResourceWarning extends Warning {}