HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux ip-172-31-4-197 6.8.0-1036-aws #38~22.04.1-Ubuntu SMP Fri Aug 22 15:44:33 UTC 2025 x86_64
User: ubuntu (1000)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: //lib/python3/dist-packages/xdg/Exceptions.py
"""
Exception Classes for the xdg package
"""

debug = False

class Error(Exception):
    """Base class for exceptions defined here."""
    def __init__(self, msg):
        self.msg = msg
        Exception.__init__(self, msg)
    def __str__(self):
        return self.msg

class ValidationError(Error):
    """Raised when a file fails to validate.
    
    The filename is the .file attribute.
    """
    def __init__(self, msg, file):
        self.msg = msg
        self.file = file
        Error.__init__(self, "ValidationError in file '%s': %s " % (file, msg))

class ParsingError(Error):
    """Raised when a file cannot be parsed.
    
    The filename is the .file attribute.
    """
    def __init__(self, msg, file):
        self.msg = msg
        self.file = file
        Error.__init__(self, "ParsingError in file '%s', %s" % (file, msg))

class NoKeyError(Error):
    """Raised when trying to access a nonexistant key in an INI-style file.
    
    Attributes are .key, .group and .file.
    """
    def __init__(self, key, group, file):
        Error.__init__(self, "No key '%s' in group %s of file %s" % (key, group, file))
        self.key = key
        self.group = group
        self.file = file

class DuplicateKeyError(Error):
    """Raised when the same key occurs twice in an INI-style file.
    
    Attributes are .key, .group and .file.
    """
    def __init__(self, key, group, file):
        Error.__init__(self, "Duplicate key '%s' in group %s of file %s" % (key, group, file))
        self.key = key
        self.group = group
        self.file = file

class NoGroupError(Error):
    """Raised when trying to access a nonexistant group in an INI-style file.
    
    Attributes are .group and .file.
    """
    def __init__(self, group, file):
        Error.__init__(self, "No group: %s in file %s" % (group, file))
        self.group = group
        self.file = file

class DuplicateGroupError(Error):
    """Raised when the same key occurs twice in an INI-style file.
    
    Attributes are .group and .file.
    """
    def __init__(self, group, file):
        Error.__init__(self, "Duplicate group: %s in file %s" % (group, file))
        self.group = group
        self.file = file

class NoThemeError(Error):
    """Raised when trying to access a nonexistant icon theme.
    
    The name of the theme is the .theme attribute.
    """
    def __init__(self, theme):
        Error.__init__(self, "No such icon-theme: %s" % theme)
        self.theme = theme