1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use std::process::{ExitCode, Termination};

pub enum ApplicationExitCode {
    Success = 0,
    WriteSettingsError = 10,
    LoadSettingsError,
    DbConnectionError,
    ServiceVersionError,
    SnapshotWatcherError,
    EmptyBlock0FolderError,
}

impl Termination for ApplicationExitCode {
    fn report(self) -> ExitCode {
        ExitCode::from(self as u8)
    }
}