sherrors.py 879 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. # sherrors.py - shell errors and signals
  2. #
  3. # Copyright 2007 Patrick Mezard
  4. #
  5. # This software may be used and distributed according to the terms
  6. # of the GNU General Public License, incorporated herein by reference.
  7. """Define shell exceptions and error codes.
  8. """
  9. class ShellError(Exception):
  10. pass
  11. class ShellSyntaxError(ShellError):
  12. pass
  13. class UtilityError(ShellError):
  14. """Raised upon utility syntax error (option or operand error)."""
  15. pass
  16. class ExpansionError(ShellError):
  17. pass
  18. class CommandNotFound(ShellError):
  19. """Specified command was not found."""
  20. pass
  21. class RedirectionError(ShellError):
  22. pass
  23. class VarAssignmentError(ShellError):
  24. """Variable assignment error."""
  25. pass
  26. class ExitSignal(ShellError):
  27. """Exit signal."""
  28. pass
  29. class ReturnSignal(ShellError):
  30. """Exit signal."""
  31. pass