csbackErrorCodes.py 6.39 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/env python
# This is <csbackErrorCodes.py>
# ----------------------------------------------------------------------------
# $Id$
# 
# Copyright (c) 2013 by Daniel Armbruster (BFO Schiltach) 
# 
# Purpose: Collection csback error codes.
# 
# ----
# This file is part of csback.
#
# csback is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# 
# csback is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with csback.  If not, see <http://www.gnu.org/licenses/>.
# ----
#
# REVISIONS and CHANGES 
#    23/02/2013   V1.0   Daniel Armbruster
Daniel Armbruster's avatar
Daniel Armbruster committed
29
#    08/11/2013   V1.0.1 added GLOBAL_NotImplemented
30
31
32
33
34
35
36
37
38
39
40
41
42
# 
# ============================================================================
#

# ----------------------------------------------------------------------------
# global error codes (used by several csback tools and modules)
# ----------------------------------------------------------------------------
# general usage error while using program
GLOBAL_UsageError=1
# unhandled commandline option chosen
GLOBAL_UnhandledOption=2
# program called with invalid commandline arguments
GLOBAL_InvalidCmdlineArgs=3
Daniel Armbruster's avatar
Daniel Armbruster committed
43
44
# the function isn't implemented yet
GLOBAL_NotImplemented=4
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
# unhandled exception caught
GLOBAL_UnhandledException=9

# ----------------------------------------------------------------------------
# csbackntfy specific error codes
# ----------------------------------------------------------------------------
# an IOError occurred while parsing a log file
NTFY_IOError=101
# invalid email address
NTFY_InvalidMailAdd=102

# ----------------------------------------------------------------------------
# csback2cron specific error codes
# ----------------------------------------------------------------------------
# error while parsing CONFIGFILE
CRON_ParsingError=201
# missing required option in section
CRON_MissingOption=202
# argument error while parsing CONFIGFILE
CRON_ArgError=203
# undefined section in CONFIGFILE
CRON_UndefinedSection=204
# already existent crontab file
CRON_ExistentCrontab=205

# ----------------------------------------------------------------------------
# csbackresc specific error codes
# ----------------------------------------------------------------------------
# exit status if tag is unkown
RESC_UnknownTag=302
# exit status if ID is missing
RESC_MissingId=303
# exit status if entry property missing
RESC_MissingProberty=304
# exit status for ssh problems
RESC_Ssh=305
# exit status for scp problems
RESC_Scp=306
# exit status for status file problems
RESC_WriteStatus=307
# exit status if directory is not available
RESC_InvalidDir=308
# exit status if file is not available
RESC_InvalidFile=309
# exit status if arbitrary file error
RESC_FileIo=310

# ----------------------------------------------------------------------------
# csbackobs specific error codes
# ----------------------------------------------------------------------------
# error while executing commands
OBS_WhileExecutingCmds=401

# ----------------------------------------------------------------------------
# csbackchk specific error codes
# ----------------------------------------------------------------------------
# different directory structure of SOURCEPATH and PATH
CHK_DifferentDirStructure=501
# PATH does not contain a checksum file
CHK_MissingChecksumFile=502

# ----------------------------------------------------------------------------
# csbackgen specific error codes
# ----------------------------------------------------------------------------
# invalid hash function in use
GEN_InvalidHashFunction=601

# ----------------------------------------------------------------------------
# csbackscp specific error codes
# ----------------------------------------------------------------------------
# error while executing rsync
SCP_RsyncError=701
# error while copying files with selected command
SCP_CopyError=702
# source directory and target directory are equal
SCP_SourceDirEqualTargetDir=703
# error while creating/updating directory tree with rsync remotely
SCP_RsyncErrorDirTree=704
# error while executing find command
SCP_FindError=705

# ----------------------------------------------------------------------------
# pidlock module specific error codes
# ----------------------------------------------------------------------------
# if directory to lock is allready locked.
LOCK_DirAlreadyLocked=801
# if lockking mechanism is not able to hold the lock anymore.
LOCK_CanNotHoldLonger=802
# while releasing a lock an invalid PID was passed
LOCK_InvalidPID=803
# unable to create a lock file
LOCK_UnableToCreate=804
# unable to remove lockfile of inactive process
LOCK_UnableToRemove=805
# timeout has expired while waiting for active process
LOCK_TimeOutExpired=806
# missing lock file
LOCK_LockFileMissing=807
# lock of directory already announced by process with same PID
LOCK_SamePidActive=808

# ----------------------------------------------------------------------------
# csfile module specific error codes
# ----------------------------------------------------------------------------
# while computing the checksum of a data file an error occurred
CSFILE_UnableToReadDataFile=901
# unable to handle function argument -> leads to a TypeError
CSFILE_InvalidType=902
# unable to append new checksum lines to checksum file
CSFILE_UnableToAppend=903
# list passed does contain elements which are not of type CsLine
CSFILE_InvalidDataType=904
# directory path does not exist
CSFILE_DirNotExistent=905
# reading the checksum file was not successful
CSFILE_UnableToReadChecksumFile=906
# error while creating new checksum file
CSFILE_UnableToCreateChecksumFile=907
# checksum file does not contain an entry for file
CSFILE_NoEntryAvail=908
# while checking - file does not exist 
CSFILE_DataFileNotExistent=909
# error while collecting subdirectories
CSFILE_CollectingSubDirs=910
# TypeError while processing time exclusion for data files
CSFILE_TimeProcessingTypeError=911
# OverflowError while processing time exclusion for data files. Given time is
# out of range
CSFILE_TimeProcessingOverflowError=912


# ----- END OF csbackErrorCodes.py -----