Commit graph

13 commits

Author SHA1 Message Date
Thomas Waldmann
69072f0c17
BackupErrors get caught and give warning RCs
also: use more union operators rather than .union()
2023-12-27 13:48:55 +01:00
Thomas Waldmann
83bf4d8c7d
raise BackupOSError subclasses 2023-12-27 13:48:52 +01:00
Thomas Waldmann
82f147f63f
add NotFoundWarning 2023-12-27 13:48:49 +01:00
Thomas Waldmann
775b9f5560
extend errorlist script to warnings, update docs 2023-12-27 13:48:41 +01:00
Thomas Waldmann
2fda86ce61
more detailled warnings for source file OSErrors 2023-12-27 13:48:14 +01:00
Thomas Waldmann
53291a4ac0
BackupError->BackupWarning, BackupOSError->BackupOSWarning 2023-12-27 13:48:12 +01:00
Thomas Waldmann
c2e8bb0468
move Backup*Error to errors module 2023-12-27 13:48:11 +01:00
Thomas Waldmann
482ac47ed8
new warnings infrastructure to support modern exit codes
- implement updating exit code based on severity, including modern codes
- extend print_warning with kwargs wc (warning code) and wt (warning type)
- update a global warnings_list with warning_info elements
- create a class hierarchy below BorgWarning class similar to Error class
- diff: change harmless warnings about speed to rc == 0
- delete --force --force: change harmless warnings to rc == 0

Also:

- have BackupRaceConditionError as a more precise subclass of BackupError
2023-12-27 13:47:52 +01:00
Thomas Waldmann
62ad0369ef
update "modern" error RCs (docs and code) 2023-12-27 13:45:48 +01:00
Thomas Waldmann
2a13268e05
BORG_EXIT_CODES=modern can be set to get more specific process exit codes
If not set, it will default to "legacy" (always return 2 for errors).

This commit only changes the Error exception class and its subclasses.

The more specific exit codes need to be defined via .exit_mcode in the subclasses.
2023-12-27 13:41:46 +01:00
Andrea Gelmini
72e7c46fa7 Fix typos 2021-01-07 17:54:33 +01:00
finefoot
235b131015
Allow message for Error base class 2020-04-11 12:58:04 +02:00
Thomas Waldmann
3e78549f76 helpers: split into smaller modules 2017-08-07 23:05:46 +02:00