diff options
author | Giampaolo Rodola <g.rodola@gmail.com> | 2021-10-03 15:55:16 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-03 15:55:16 +0200 |
commit | 5d39cc9c8d8dc04862786abba0307ed9350144ce (patch) | |
tree | e143b54d389d63ba6e21a7946345ed67babed5cb /docs | |
parent | d01233263f046f07d5139a8611671525f74e3dd0 (diff) | |
download | psutil-5d39cc9c8d8dc04862786abba0307ed9350144ce.tar.gz |
Improve custom error tracebacks and messages (#1992)
Removal of duplicated `psutil.NoSuchProcess` text. Before:
```
psutil.NoSuchProcess: psutil.NoSuchProcess process no longer exists (pid=4651, name="python")
psutil.ZombieProcess: psutil.ZombieProcess process no longer exists and it's a zombie (pid=4651, name="python")
psutil.AccessDenied: psutil.AccessDenied (pid=4651, name="python")
psutil.TimeoutExpired: psutil.TimeoutExpired timeout after 5 seconds (pid=4651, name="python")
```
Now:
```
psutil.NoSuchProcess: process no longer exists (pid=4651, name="python")
psutil.ZombieProcess: process no longer exists and it's a zombie (pid=4651, name="python")
psutil.AccessDenied: (pid=4651, name="python")
psutil.TimeoutExpired: timeout after 5 seconds (pid=4651, name="python")
```
---
More info if process PID has been reused: Before:
```
psutil.NoSuchProcess: psutil.NoSuchProcess process no longer exists (pid=465148)
```
Now:
```
psutil.NoSuchProcess: process no longer exists and its PID has been reused (pid=465148)
```
---
Before:
```
psutil.NoSuchProcess: psutil.NoSuchProcess no process found with pid 666
```
Now:
```
psutil.NoSuchProcess: process PID not found (pid=666)
```
---
Before:
```
>>> psutil.NoSuchProcess(212, name="python")
psutil.NoSuchProcess process no longer exists (pid=212, name='python')
```
Now:
```
>>> psutil.NoSuchProcess(212, name="python")
psutil.NoSuchProcess(pid=212, name='python', msg='process no longer exists')
```
Diffstat (limited to 'docs')
0 files changed, 0 insertions, 0 deletions