raiser.pyx 466 B

123456789101112131415161718192021
  1. # Copyright (c) Twisted Matrix Laboratories.
  2. # See LICENSE for details.
  3. """
  4. A trivial extension that just raises an exception.
  5. See L{twisted.test.test_failure.test_failureConstructionWithMungedStackSucceeds}.
  6. """
  7. class RaiserException(Exception):
  8. """
  9. A speficic exception only used to be identified in tests.
  10. """
  11. def raiseException():
  12. """
  13. Raise L{RaiserException}.
  14. """
  15. raise RaiserException("This function is intentionally broken")