Skip to main content

Exit Codes

Exit Codes:

Exit codes are numerical values returned by a program upon completion, indicating the success or failure of the executed command. These codes are essential for automation, scripting, and error handling, allowing other programs or users to easily interpret the outcome of a command. By convention, an exit code of 0 signifies success, while any non-zero value indicates an error or failure. Properly defining and using exit codes ensures better usability and troubleshooting in command-line environments.

XPManager Exit Codes:

In XManager we provide exit codes to facilitate error tracking and make integration with other tools easy. Here is a table showing the exit codes, their values ​​and descriptions:

nameExit CodeDescription
FileNotFound50The file you will be working on does not exist.
FileCreate51Can not create the file.
FileOpen52Can not open the file.
FileRead53Can not read the file.
FileWrite54Can not write to the file.
FileSeek55Can not move the file pointer.
FileFlush56Can not flush the file to the disk.
FileDelete57Can not delete the file.
FileAlreadyEncrypted58The file you will be working on is already encrypted.
FileNotEncrypted59The file you will be working on is not encrypted.
DirNotFound65The directory you will be working on does not exist.
DirCreate66Can not create the directory.
DirUnsupported67Can not process the directory because it is not supported.
CanNotGetDirData68Can not get the directory data.
SystemDataDirNotFound69Can not find the system data directory.
CanNotGetFileOrDirType70The type could not be determined whether it is file or directory.
CanNotGetJsonObject75Can not map the json object to Value type in serde_json.
InvalidJson76The json value is invalid.
InvalidKey80Invalid encryption or decryption key.
InvalidEncryptionData81Encryption data can not be decrypted.
DBConnection85Can not connect the SQLite database file.
DBInsert86Can not insert to the database file.
DBCreateTable87Can not create the database table.
PMDatabaseNotFound89Password manager database file not found.
PMDatabaseEmpty90Password manager database is empty.
LMDatabaseNotFound91Log manager database file not found.
LogNotFound92Not found log in the database.
LMDatabaseEncrypted93Log manager database encrypted.
Input95Error input.
MissingArg96Missing some args.
ConfirmationNotMatch97The confirmation code not match.
SampleContainSpace98Sample contain space.