1# Copyright 2007 Google Inc. 2# 3# This program is free software; you can redistribute it and/or 4# modify it under the terms of the GNU General Public License 5# as published by the Free Software Foundation; either version 2 6# of the License, or (at your option) any later version. 7# 8# This program is distributed in the hope that it will be useful, 9# but WITHOUT ANY WARRANTY; without even the implied warranty of 10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11# GNU General Public License for more details. 12# 13# You should have received a copy of the GNU General Public License 14# along with this program; if not, write to the Free Software Foundation, 15# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 16"""Exception classes for nss_cache module.""" 17 18__author__ = 'vasilios@google.com (Vasilios Hoffman)' 19 20 21class Error(Exception): 22 """Base exception class for nss_cache.""" 23 pass 24 25 26class CacheNotFound(Error): 27 """Raised when a local cache is missing.""" 28 pass 29 30 31class CacheInvalid(Error): 32 """Raised when a cache is invalid.""" 33 pass 34 35 36class CommandParseError(Error): 37 """Raised when the command line fails to parse correctly.""" 38 pass 39 40 41class ConfigurationError(Error): 42 """Raised when there is a problem with configuration values.""" 43 pass 44 45 46class EmptyMap(Error): 47 """Raised when an empty map is discovered and one is not expected.""" 48 pass 49 50 51class NoConfigFound(Error): 52 """Raised when no configuration file is loaded.""" 53 pass 54 55 56class PermissionDenied(Error): 57 """Raised when nss_cache cannot access a resource.""" 58 pass 59 60 61class UnsupportedMap(Error): 62 """Raised when trying to use an unsupported map type.""" 63 pass 64 65 66class InvalidMap(Error): 67 """Raised when an invalid map is encountered.""" 68 pass 69 70 71class SourceUnavailable(Error): 72 """Raised when a source is unavailable.""" 73 pass 74 75 76class InvalidMerge(Error): 77 """An invalid merge was attempted.""" 78