# Path: wikked/utils.py
# class PageNotFoundError(Exception):
#     """ An error raised when no physical file
#        is found for a given URL.
#     """
#     def __init__(self, url, message=None, *args):
#         Exception.__init__(self, url, message, *args)
# 
#     @property
#     def url(self):
#         return self.args[0]
# 
#     def __str__(self):
#         url = self.args[0]
#         message = self.args[1]
#         res = "Can't find page '%s'." % url
#         if message:
#             res += ' ' + message
#         return res


from wikked.utils import PageNotFoundError


class DatabaseUpgradeRequired(Exception):
    def __init__(self, *args):
        super().__init__(
            "This wiki needs a database update. Please run `wk reset`.",
            *args)


class PageListNotFound(Exception):
    def __init__(self, list_name):
        super(PageListNotFound, self).__init__(
                "No such page list: %s" % list_name)


class NoWantedPages(Exception):
    pass



# Path: wikked/utils.py
# class PageNotFoundError(Exception):
#     """ An error raised when no physical file
#        is found for a given URL.
#     """
#     def __init__(self, url, message=None, *args):
#         Exception.__init__(self, url, message, *args)
# 
#     @property
#     def url(self):
#         return self.args[0]
# 
#     def __str__(self):
#         url = self.args[0]
#         message = self.args[1]
#         res = "Can't find page '%s'." % url
#         if message:
#             res += ' ' + message
#         return res


# Path: wikked/db/base.py
from wikked.utils import PageNotFoundError



class DatabaseUpgradeRequired(Exception):
    def __init__(self, *args):
        super().__init__(
            "This wiki needs a database update. Please run `wk reset`.",
            *args)


class PageListNotFound(Exception):
    def __init__(self, list_name):
        super(PageListNotFound, self).__init__(
                "No such page list: %s" % list_name)


class NoWantedPages(Exception):
    pass



class Database(object):