Exceptions.hx 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355
  1. package python.lib;
  2. @:native("BaseException")
  3. extern class BaseException
  4. {
  5. public function new (msg:String):Void;
  6. }
  7. @:native("BufferError")
  8. extern class BufferError extends BaseException
  9. {
  10. }
  11. @:native("GeneratorExit")
  12. extern class GeneratorExit extends BaseException
  13. {
  14. }
  15. @:native("KeyboardInterrupt")
  16. extern class KeyboardInterrupt extends BaseException
  17. {
  18. }
  19. @:native("Exception")
  20. extern class Exception extends BaseException
  21. {
  22. }
  23. @:native("SyntaxError")
  24. extern class SyntaxError extends Exception
  25. {
  26. }
  27. @:native("StopIteration")
  28. extern class StopIteration extends Exception
  29. {
  30. public function new (?message:String);
  31. }
  32. @:native("RuntimeError")
  33. extern class RuntimeError extends Exception
  34. {
  35. }
  36. @:native("NotImplementedError")
  37. extern class NotImplementedError extends RuntimeError
  38. {
  39. }
  40. @:native("IndentationError")
  41. extern class IndentationError extends SyntaxError
  42. {
  43. }
  44. @:native("EnvironmentError")
  45. extern class EnvironmentError extends Exception
  46. {
  47. }
  48. @:native("OSError")
  49. extern class OSError extends EnvironmentError
  50. {
  51. }
  52. @:native("BlockingIOError")
  53. extern class BlockingIOError extends OSError
  54. {
  55. }
  56. @:native("ChildProcessError")
  57. extern class ChildProcessError extends OSError
  58. {
  59. }
  60. @:native("ConnectionError")
  61. extern class ConnectionError extends OSError
  62. {
  63. }
  64. @:native("BrokenPipeError")
  65. extern class BrokenPipeError extends ConnectionError
  66. {
  67. }
  68. @:native("ConnectionAbortedError")
  69. extern class ConnectionAbortedError extends ConnectionError
  70. {
  71. }
  72. @:native("ConnectionRefusedError")
  73. extern class ConnectionRefusedError extends ConnectionError
  74. {
  75. }
  76. @:native("ConnectionResetError")
  77. extern class ConnectionResetError extends ConnectionError
  78. {
  79. }
  80. @:native("FileExistsError")
  81. extern class FileExistsError extends OSError
  82. {
  83. }
  84. @:native("FileNotFoundError")
  85. extern class FileNotFoundError extends OSError
  86. {
  87. }
  88. @:native("InterruptedError")
  89. extern class InterruptedError extends OSError
  90. {
  91. }
  92. @:native("IsADirectoryError")
  93. extern class IsADirectoryError extends OSError
  94. {
  95. }
  96. @:native("NotADirectoryError")
  97. extern class NotADirectoryError extends OSError
  98. {
  99. }
  100. @:native("PermissionError")
  101. extern class PermissionError extends OSError
  102. {
  103. }
  104. @:native("ProcessLookupError")
  105. extern class ProcessLookupError extends OSError
  106. {
  107. }
  108. @:native("TimeoutError")
  109. extern class TimeoutError extends OSError
  110. {
  111. }
  112. @:native("NameError")
  113. extern class NameError extends Exception
  114. {
  115. }
  116. @:native("UnboundLocalError")
  117. extern class UnboundLocalError extends NameError
  118. {
  119. }
  120. @:native("MemoryError")
  121. extern class MemoryError extends Exception
  122. {
  123. }
  124. @:native("AssertionError")
  125. extern class AssertionError extends Exception
  126. {
  127. }
  128. @:native("AttributeError")
  129. extern class AttributeError extends Exception
  130. {
  131. }
  132. @:native("EOFError")
  133. extern class EOFError extends Exception
  134. {
  135. }
  136. @:native("ArithmeticError")
  137. extern class ArithmeticError extends Exception
  138. {
  139. }
  140. @:native("FloatingPointError")
  141. extern class FloatingPointError extends ArithmeticError
  142. {
  143. }
  144. @:native("OverflowError")
  145. extern class OverflowError extends ArithmeticError
  146. {
  147. }
  148. @:native("ZeroDivisionError")
  149. extern class ZeroDivisionError extends ArithmeticError
  150. {
  151. }
  152. @:native("ImportError")
  153. extern class ImportError extends Exception
  154. {
  155. }
  156. @:native("LookupError")
  157. extern class LookupError extends Exception
  158. {
  159. }
  160. @:native("IndexError")
  161. extern class IndexError extends LookupError
  162. {
  163. }
  164. @:native("KeyError")
  165. extern class KeyError extends LookupError
  166. {
  167. }
  168. @:native("IOError")
  169. extern class IOError extends EnvironmentError
  170. {
  171. }
  172. @:native("VMSError")
  173. extern class VMSError extends OSError
  174. {
  175. }
  176. @:native("WindowsError")
  177. extern class WindowsError extends OSError
  178. {
  179. }
  180. @:native("ValueError")
  181. extern class ValueError extends Exception
  182. {
  183. }
  184. @:native("UnicodeError")
  185. extern class UnicodeError extends ValueError
  186. {
  187. }
  188. @:native("UnicodeDecodeError")
  189. extern class UnicodeDecodeError extends UnicodeError
  190. {
  191. }
  192. @:native("UnicodeEncodeError")
  193. extern class UnicodeEncodeError extends UnicodeError
  194. {
  195. }
  196. @:native("UnicodeTranslateError")
  197. extern class UnicodeTranslateError extends UnicodeError
  198. {
  199. }
  200. @:native("Warning")
  201. extern class Warning extends Exception
  202. {
  203. }
  204. @:native("DeprecationWarning")
  205. extern class DeprecationWarning extends Warning
  206. {
  207. }
  208. @:native("PendingDeprecationWarning")
  209. extern class PendingDeprecationWarning extends Warning
  210. {
  211. }
  212. @:native("RuntimeWarning")
  213. extern class RuntimeWarning extends Warning
  214. {
  215. }
  216. @:native("SyntaxWarning")
  217. extern class SyntaxWarning extends Warning
  218. {
  219. }
  220. @:native("UserWarning")
  221. extern class UserWarning extends Warning
  222. {
  223. }
  224. @:native("FutureWarning")
  225. extern class FutureWarning extends Warning
  226. {
  227. }
  228. @:native("ImportWarning")
  229. extern class ImportWarning extends Warning
  230. {
  231. }
  232. @:native("UnicodeWarning")
  233. extern class UnicodeWarning extends Warning
  234. {
  235. }
  236. @:native("BytesWarning")
  237. extern class BytesWarning extends Warning
  238. {
  239. }
  240. @:native("ResourceWarning")
  241. extern class ResourceWarning extends Warning
  242. {
  243. }