Changeset 3413 for pykota/trunk/pykota/errors.py
- Timestamp:
- 09/27/08 22:02:37 (16 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/pykota/errors.py
r3411 r3413 8 8 # the Free Software Foundation, either version 3 of the License, or 9 9 # (at your option) any later version. 10 # 10 # 11 11 # This program is distributed in the hope that it will be useful, 12 12 # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 14 # GNU General Public License for more details. 15 # 15 # 16 16 # You should have received a copy of the GNU General Public License 17 17 # along with this program. If not, see <http://www.gnu.org/licenses/>. … … 27 27 """Saves the value passed as a parameter.""" 28 28 self.value = value 29 30 def __str__(self) : 29 30 def __str__(self) : 31 31 """Returns an unicode string representation.""" 32 32 try : 33 33 return unicode(self.value, errors="replace") 34 except TypeError : 34 except TypeError : 35 35 return unicode(self.value) # None and strings which are already unicode 36 36 37 37 class PyKotaToolError(PyKotaError) : 38 38 """PyKota Exception for all executables.""" 39 39 pass 40 40 41 41 class PyKotaToolError(PyKotaError) : 42 42 """PyKota Exception for all executables.""" 43 43 pass 44 44 45 45 class PyKotaCommandLineError(PyKotaToolError) : 46 46 """PyKota Exception for errors on executables' command line.""" 47 47 pass 48 48 49 49 class PyKotaStorageError(PyKotaError) : 50 50 """PyKota Exception for database backend related errors.""" 51 51 pass 52 52 53 53 class PyKotaConfigError(PyKotaError) : 54 54 """PyKota Exception for errors in PyKota's configuration.""" 55 55 pass 56 56 57 57 class PyKotaAccounterError(PyKotaError) : 58 58 """PyKota Exception for errors in PyKota accounters.""" 59 59 pass 60 60 61 61 class PyKotaReporterError(PyKotaError) : 62 62 """PyKota Exception for errors in PyKota report generators.""" 63 63 pass 64 64 65 65 class PyKotaLoggingError(PyKotaError) : 66 66 """PyKota Exception for errors in PyKota logging."""