docs: :exc:`TypeError`
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by defuz · committed by defuz · parent 5562acf · Browse files · 5 files·+5 added−5 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
5 files+5 added−5 removed
- other:+5 added−5 removed
Provenance
- Commit
1501b79- Tree
501ba0d- Author
defuz <defuz.net@gmail.com>- Committer
defuz <defuz.net@gmail.com>- Parent
5562acf
5 files changed+5 added−5 removed
modified:docs/quickstart.rst+1 added-1 removed
568 unmodified lines569 570 searchword = request.args.get('key', '')571 572 We recommend accessing URL parameters with `get` or by catching the573-`KeyError` because users might change the URL and presenting them a 400573+:exc:`KeyError` because users might change the URL and presenting them a 400574 bad request page in that case is not user friendly.575 576 For a full list of methods and attributes of the request object, head over577 to the :class:`~flask.request` documentation.316 unmodified linesmodified:docs/upgrading.rst+1 added-1 removed
90 unmodified lines91 :exc:`~werkzeug.exceptions.BadRequest` exception instead of letting the92 default :exc:`ValueError` bubble up. This has the advantage that you no93 longer have to handle that error to avoid an internal server error showing94 up for the user. If you were catching this down explicitly in the past95-as `ValueError` you will need to change this.95+as :exc:`ValueError` you will need to change this.96 97 Due to a bug in the test client Flask 0.7 did not trigger teardown98 handlers when the test client was used in a with statement. This was99 since fixed but might require some changes in your test suites if you283 unmodified linesmodified:flask/app.py+1 added-1 removed
377 unmodified lines378 379 #: A list of functions that are called when :meth:`url_for` raises a380 #: :exc:`~werkzeug.routing.BuildError`. Each function registered here381 #: is called with `error`, `endpoint` and `values`. If a function382- #: returns ``None`` or raises a `BuildError` the next function is382+ #: returns ``None`` or raises a :exc:`BuildError` the next function is383 #: tried.384 #:385 #: .. versionadded:: 0.9386 self.url_build_error_handlers = []1523 unmodified linesmodified:flask/helpers.py+1 added-1 removed
246 unmodified lines247 :param _external: if set to ``True``, an absolute URL is generated. Server248 address can be changed via ``SERVER_NAME`` configuration variable which249 defaults to `localhost`.250 :param _scheme: a string specifying the desired URL scheme. The `_external`251- parameter must be set to ``True`` or a `ValueError` is raised. The default251+ parameter must be set to ``True`` or a :exc:`ValueError` is raised. The default252 behavior uses the same scheme as the current request, or253 ``PREFERRED_URL_SCHEME`` from the :ref:`app configuration <config>` if no254 request context is available. As of Werkzeug 0.10, this also can be set255 to an empty string to build protocol-relative URLs.648 unmodified linesmodified:flask/json.py+1 added-1 removed
58 unmodified lines59 60 def default(self, o):61 """Implement this method in a subclass such that it returns a62 serializable object for ``o``, or calls the base implementation (to63- raise a ``TypeError``).63+ raise a :exc:`TypeError`).64 65 For example, to support arbitrary iterators, you could implement66 default like this::67 183 unmodified lines