From 8431ea7ca4f0e79f9cbde6ee224e3e91815f2e29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Sun, 25 Dec 2022 13:28:25 +0100 Subject: [PATCH] Exceptions --- README.md | 2 +- index.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4b35563..38bf01a 100644 --- a/README.md +++ b/README.md @@ -1407,7 +1407,7 @@ except (, [...]) as : ... * **Also catches subclasses of the exception.** * **Use `'traceback.print_exc()'` to print the error message to stderr.** * **Use `'print()'` to print just the cause of the exception (its arguments).** -* **Use `'logging.exception()'` to log the exception.** +* **Use `'logging.exception()'` to log the passed message, followed by the full error message of the caught exception.** ### Raising Exceptions ```python diff --git a/index.html b/index.html index e77589b..0145148 100644 --- a/index.html +++ b/index.html @@ -1209,7 +1209,7 @@ LogicOp = Enum('LogicOp', {'traceback.print_exc()' to print the error message to stderr.
  • Use 'print(<name>)' to print just the cause of the exception (its arguments).
  • -
  • Use 'logging.exception(<message>)' to log the exception.
  • +
  • Use 'logging.exception(<message>)' to log the passed message, followed by the full error message of the caught exception.
  • Raising Exceptions

    raise <exception>
     raise <exception>()