[feat] durs: use human-panic
Utilisation de la crate human-panic dans les main
de durs-server
.
Cella affecte les messages d'erreur console dans tous les crates pour chaque panic!
donc également la macro fatal_error!
. (ça ne modifie pas les logs générés dans,~/.config/durs-dev/default/durs.log
).
- Exemple d'erreur en interdisant l'accès à la blockchain local lors d'un sync:
$ sudo chown -R root:root ~/.config/duniter/duniter_default/g1
$ sudo chmod 600 ~/.config/duniter/duniter_default/g1
$ ./durs sync -t ts
Start fast sync...
Well, this is embarrassing.
durs had a problem and crashed. To help us diagnose the problem you can send us a crash report.
We have generated a report file at "/tmp/report-7f41f7fd-6be5-49a1-a32e-d80e748d326e.toml". Submit an issue or email with the subject of "durs Crash Report" and include the report as an attachment.
- Authors: librelois <elois@duniter.org>, nanocryk <nanocryk@duniter.org>, inso <inso@tuta.io>
We take privacy seriously, and do not perform any automated error collection. In order to improve the software, we rely on people to submit reports.
Thank you kindly!
Aborted
(message en rouge)
Voici le rapport /tmp/report-*.toml
généré:
name = 'durs'
operating_system = 'unix:Unknown'
crate_version = '0.1.1-a1'
explanation = '''
Cause: Fail to read dir json_files_path !. Panic occurred in file 'lib/modules/blockchain/blockchain/src/sync/download/json_reader_worker.rs' at line 209
'''
method = 'Panic'
backtrace = '''
stack backtrace:
0: backtrace::backtrace::libunwind::trace::h4996581d4c31aa1e (0x557b166f4e7c)
at /home/jonas/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.13/src/backtrace/libunwind.rs:52
backtrace::backtrace::trace_unsynchronized::h97dbf0fd91429bc0
at /home/jonas/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.13/src/backtrace/mod.rs:57'''
Edited by Éloïs