]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
raise more generic Exception() instead of RuntimeError() #5281
authorBenjamin Peterson <benjamin@python.org>
Mon, 16 Feb 2009 16:15:34 +0000 (16:15 +0000)
committerBenjamin Peterson <benjamin@python.org>
Mon, 16 Feb 2009 16:15:34 +0000 (16:15 +0000)
Doc/reference/simple_stmts.rst

index 8797ece76a42e94f7796a44944f0654889ded94e..1e3cb8559bbfca8e0e5a90bf5937fdd8433f64aa 100644 (file)
@@ -503,7 +503,7 @@ You can create an exception and set your own traceback in one step using the
 :meth:`with_traceback` exception method (which returns the same exception
 instance, with its traceback set to its argument), like so::
 
-   raise RuntimeError("foo occurred").with_traceback(tracebackobj)
+   raise Exception("foo occurred").with_traceback(tracebackobj)
 
 .. index:: pair: exception; chaining
            __cause__ (exception attribute)