Skip to content

Commit 9b9df87

Browse files
kierunjhermann
authored andcommitted
Trivial change to documentation. (#120)
Added section about correct & easy error reporting from parsing exceptions.
1 parent 22234f3 commit 9b9df87

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

docs/configobj.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1601,6 +1601,11 @@ code can be the same whether one error is raised in parsing , or several.
16011601
It also means that in the most common case (a single error) a useful error
16021602
message will be raised.
16031603

1604+
Unless you want to format the error message differently from the default, you
1605+
should use ``str(ex)`` or better yet, use the exception in a format where the
1606+
conversion is implicit. This uses the exception's ``__str__()`` method which in all
1607+
likelyhood will output all the information you want to know.
1608+
16041609
.. note::
16051610

16061611
One wrongly written line could break the basic structure of your config

0 commit comments

Comments
 (0)