mirror of
https://github.com/rclone/rclone.git
synced 2025-06-12 18:43:41 +08:00
cmd: Move exit status codes to separate package
Signal handling by the `atexit` package needs acceess to `exitCodeUncategorizedError`. With this change all exit status values are moved to a dedicated package so that they can be reused. Signed-off-by: Michael Hanselmann <public@hansmi.ch>
This commit is contained in:

committed by
Nick Craig-Wood

parent
ba5c559fec
commit
cf19073ac9
25
lib/exitcode/exitcode.go
Normal file
25
lib/exitcode/exitcode.go
Normal file
@ -0,0 +1,25 @@
|
||||
// Package exitcode exports rclone's exit status numbers.
|
||||
package exitcode
|
||||
|
||||
const (
|
||||
// Success is returned when rclone finished without error.
|
||||
Success = iota
|
||||
// UsageError is returned when there was a syntax or usage error in the arguments.
|
||||
UsageError
|
||||
// UncategorizedError is returned for any error not categorised otherwise.
|
||||
UncategorizedError
|
||||
// DirNotFound is returned when a source or destination directory is not found.
|
||||
DirNotFound
|
||||
// FileNotFound is returned when a source or destination file is not found.
|
||||
FileNotFound
|
||||
// RetryError is returned for temporary errors during operations which may be retried.
|
||||
RetryError
|
||||
// NoRetryError is returned for errors from operations which can't/shouldn't be retried.
|
||||
NoRetryError
|
||||
// FatalError is returned for errors one or more retries won't resolve.
|
||||
FatalError
|
||||
// TransferExceeded is returned when network I/O exceeded the quota.
|
||||
TransferExceeded
|
||||
// NoFilesTransferred everything succeeded, but no transfer was made.
|
||||
NoFilesTransferred
|
||||
)
|
Reference in New Issue
Block a user