Skip to content
Myr

slimmed down error handling intro

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Phil Schaf · committed by Phil Schaf · parent d4ad47a · Browse files · 2 files+2 added−7 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+2 added−7 removed

  • other:+2 added−7 removed

2 files+2 added−7 removed

modified:docs/errorhandling.rst+1 added-6 removed
33 unmodified lines
34--------------3536.. versionadded:: 1.03738Some errors are unavoidable because not only you make them. Users might39enter a wrong password or do something different in a way that you just40cannot allow. Or a third party service that your site relies on is41unreachable while an user tries to do something with it.4243In those cases you might want to show error pages to the user in response.38You might want to show error pages to the user when an error occurs.39This can be done by registering error handlers.4041Error handlers are normal :ref:`views` but instead of being registered for42routes they are registered exceptions that are rised while trying to do
307 unmodified lines
modified:docs/upgrading.rst+1 added-1 removed
42 unmodified lines
43 only for exception *instances*. This was unintended and plain wrong,44 and therefore was replaced with the intended behavior of registering45 handlers only using exception classes and HTTP error codes.46 47 Trying to register a handler on an instance now raises :exc:`ValueError`47 Trying to register a handler on an instance now raises :exc:`ValueError`.4849.. _upgrading-to-010:5051Version 0.10
348 unmodified lines