Skip to content

Commit d9bf67f

Browse files
authored
DOC: Make ordering on warnings page consistent (#2616)
Put exceptions, warnings, and log messages in a consistent order
1 parent b1b55e6 commit d9bf67f

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

docs/user/suppress-warnings.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
11
# Exceptions, Warnings, and Log messages
22

3-
pypdf makes use of 3 mechanisms to show that something went wrong:
3+
pypdf makes use of three mechanisms to show if something went wrong:
44

5-
* **Log messages** are informative messages that can be used for post-mortem
6-
analysis. Most of the time, users can ignore them. They come in different
7-
*levels*, such as info / warning / error indicating the severity.
8-
Examples are non-standard compliant PDF files which pypdf can deal with or
9-
a missing implementation that leads to a part of the text not being extracted.
5+
* **Exceptions** are error cases that pypdf users should explicitly handle.
6+
In the `strict=True` mode, most log messages with the warning level will
7+
become exceptions. This can be useful in applications where you can require
8+
a user to fix the broken PDF.
109
* **Warnings** are avoidable issues, such as using deprecated classes /
1110
functions / parameters. Another example is missing capabilities of pypdf.
1211
In those cases, pypdf users should adjust their code. Warnings
1312
are issued by the `warnings` module - those are different from the log-level
1413
"warning".
15-
* **Exceptions** are error-cases that pypdf users should explicitly handle.
16-
In the `strict=True` mode, most log messages with the warning level will
17-
become exceptions. This can be useful in applications where you can require
18-
a user to fix the broken PDF.
14+
* **Log messages** are informative messages that can be used for post-mortem
15+
analysis. Most of the time, users can ignore them. They come in different
16+
*levels*, such as info / warning / error indicating the severity.
17+
Examples are non-standard compliant PDF files which pypdf can deal with or
18+
a missing implementation that leads to a part of the text not being extracted.
1919

2020

2121
## Exceptions
2222

2323
Exceptions need to be caught if you want to handle them. For example, you could
2424
want to read the text from a PDF as a part of a search function.
2525

26-
Most PDF files don't follow the specifications. In this case pypdf needs to
26+
Most PDF files do not follow the specification. In this case pypdf needs to
2727
guess which kinds of mistakes were potentially done when the PDF file was created.
2828
See [the robustness page](robustness.md) for the related issues.
2929

30-
As a users, you likely don't care about it. If it's readable in any way, you
30+
As a user, you likely do not care about it. If it is readable in any way, you
3131
want the text. You might use pdfminer.six as a fallback and do this:
3232

3333
```python
@@ -62,7 +62,7 @@ see all warnings. This is especially true for Continuous Integration (CI).
6262

6363
## Log messages
6464

65-
Log messages can be noisy in some cases. pypdf hopefully is having a reasonable
65+
Log messages can be noisy in some cases. pypdf hopefully has a reasonable
6666
level of log messages, but you can reduce which types of messages you want to
6767
see:
6868

0 commit comments

Comments
 (0)