Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.11/site-packages/IPython/core/error.py: 100%

Shortcuts on this page

r m x   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

7 statements  

1""" 

2Global exception classes for IPython.core. 

3 

4Authors: 

5 

6* Brian Granger 

7* Fernando Perez 

8* Min Ragan-Kelley 

9 

10Notes 

11----- 

12""" 

13 

14#----------------------------------------------------------------------------- 

15# Copyright (C) 2008 The IPython Development Team 

16# 

17# Distributed under the terms of the BSD License. The full license is in 

18# the file COPYING, distributed as part of this software. 

19#----------------------------------------------------------------------------- 

20 

21#----------------------------------------------------------------------------- 

22# Imports 

23#----------------------------------------------------------------------------- 

24 

25#----------------------------------------------------------------------------- 

26# Exception classes 

27#----------------------------------------------------------------------------- 

28 

29class IPythonCoreError(Exception): 

30 pass 

31 

32 

33class TryNext(IPythonCoreError): 

34 """Try next hook exception. 

35 

36 Raise this in your hook function to indicate that the next hook handler 

37 should be used to handle the operation. 

38 """ 

39 

40class UsageError(IPythonCoreError): 

41 """Error in magic function arguments, etc. 

42 

43 Something that probably won't warrant a full traceback, but should 

44 nevertheless interrupt a macro / batch file. 

45 """ 

46 

47class StdinNotImplementedError(IPythonCoreError, NotImplementedError): 

48 """raw_input was requested in a context where it is not supported 

49 

50 For use in IPython kernels, where only some frontends may support 

51 stdin requests. 

52 """ 

53 

54class InputRejected(Exception): 

55 """Input rejected by ast transformer. 

56 

57 Raise this in your NodeTransformer to indicate that InteractiveShell should 

58 not execute the supplied input. 

59 """