25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

35 lines
992 B

  1. class FormParserError(ValueError):
  2. """Base error class for our form parser."""
  3. class ParseError(FormParserError):
  4. """This exception (or a subclass) is raised when there is an error while
  5. parsing something.
  6. """
  7. #: This is the offset in the input data chunk (*NOT* the overall stream) in
  8. #: which the parse error occurred. It will be -1 if not specified.
  9. offset = -1
  10. class MultipartParseError(ParseError):
  11. """This is a specific error that is raised when the MultipartParser detects
  12. an error while parsing.
  13. """
  14. class QuerystringParseError(ParseError):
  15. """This is a specific error that is raised when the QuerystringParser
  16. detects an error while parsing.
  17. """
  18. class DecodeError(ParseError):
  19. """This exception is raised when there is a decoding error - for example
  20. with the Base64Decoder or QuotedPrintableDecoder.
  21. """
  22. class FileError(FormParserError, OSError):
  23. """Exception class for problems with the File class."""