Skip to content
This repository was archived by the owner on Oct 23, 2025. It is now read-only.
This repository was archived by the owner on Oct 23, 2025. It is now read-only.

Little manual to write error handlers #21

Open

Description

@joaofix

This is very valuable to the final users and can be separated into these following smaller tasks, for each error type:

  • Consider if the current error handler could be improved. For this, I assume the heuristic that the less we process an error message, the better it is for Stackoverlfow to find the relevant related questions (and answers).
  • Consider if the error has a simple nature, namely, it is only raised on a few and specific occasions. If this is the case, a handler that builds a helper message to the user manually, considering the context of this error (offending line variables, imported packages, etc) might be of greater help to the user.
  • Consider if the built-in help system can be useful for error you're working on. Sometimes pydocs can be simple, understandable, and useful (and sometimes not).
  • Consider how the most relevant SO questions on the error type are asked, maybe this will help you build a better error handler.
  • Consider something that is not listed above to improve the error messages. I just put up on here some of my ideas on the topic but surely there are more ways to build great queries, which will lead us to great answers for final users.

Activity

  1. added this to the Project Requirements milestone on Nov 11, 2020
  2. joaofix commented on Dec 2, 2020

    @joaofix
    OwnerAuthor

    CPython docuementation may help to track exactly which situations raises a specific exception:
    https://github.com/python/cpython/blob/4b9aad49992a825d8c76e428ed1aca81dd3878b2/Doc/library/exceptions.rst

  3. changed the title [-]Improve error message[/-] [+]Little manual to write error handlers[/+] on Jan 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions