/std/python/Exceptions.hx

https://gitlab.com/ezeql/haxe · Haxe · 376 lines · 243 code · 112 blank · 21 comment · 0 complexity · fc43564150bf736fd517a37b2d085fdd MD5 · raw file

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