Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.11/site-packages/python_multipart/exceptions.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  

1class FormParserError(ValueError): 

2 """Base error class for our form parser.""" 

3 

4 

5class ParseError(FormParserError): 

6 """This exception (or a subclass) is raised when there is an error while 

7 parsing something. 

8 """ 

9 

10 #: This is the offset in the input data chunk (*NOT* the overall stream) in 

11 #: which the parse error occurred. It will be -1 if not specified. 

12 offset = -1 

13 

14 

15class MultipartParseError(ParseError): 

16 """This is a specific error that is raised when the MultipartParser detects 

17 an error while parsing. 

18 """ 

19 

20 

21class QuerystringParseError(ParseError): 

22 """This is a specific error that is raised when the QuerystringParser 

23 detects an error while parsing. 

24 """ 

25 

26 

27class DecodeError(ParseError): 

28 """This exception is raised when there is a decoding error - for example 

29 with the Base64Decoder or QuotedPrintableDecoder. 

30 """ 

31 

32 

33class FileError(FormParserError, OSError): 

34 """Exception class for problems with the File class."""