diff --git a/royalnet/campaigns/exc.py b/royalnet/campaigns/exc.py index 761ee74c..d036e2ac 100644 --- a/royalnet/campaigns/exc.py +++ b/royalnet/campaigns/exc.py @@ -1,4 +1,17 @@ -class ChallengeFailedError(Exception): +from ..errors import RoyalnetException + + +class CampaignsError(RoyalnetException): + """An error related to the campaigns module.""" + + +class ChallengeFailedError(CampaignsError): """ The data passed to the Campaign (or its async equivalent) failed the challenge. """ + + +__all__ = ( + "CampaignsError", + "ChallengeFailedError", +) diff --git a/royalnet/scroll/__init__.py b/royalnet/scrolls/__init__.py similarity index 99% rename from royalnet/scroll/__init__.py rename to royalnet/scrolls/__init__.py index 99fc3444..6557ff84 100644 --- a/royalnet/scroll/__init__.py +++ b/royalnet/scrolls/__init__.py @@ -5,7 +5,7 @@ import re import toml import json -from .errors import * +from .exc import * class Scroll: diff --git a/royalnet/scroll/errors.py b/royalnet/scrolls/exc.py similarity index 63% rename from royalnet/scroll/errors.py rename to royalnet/scrolls/exc.py index eeeb40bd..10f91fb3 100644 --- a/royalnet/scroll/errors.py +++ b/royalnet/scrolls/exc.py @@ -1,19 +1,19 @@ from ..errors import RoyalnetException -class ScrollException(RoyalnetException): - """An exception raised by the Scroll module.""" +class ScrollsException(RoyalnetException): + """An exception raised by the scrolls module.""" -class NotFoundError(ScrollException): +class NotFoundError(ScrollsException): """The requested config key was not found.""" -class InvalidFormatError(ScrollException): +class InvalidFormatError(ScrollsException): """The requested config key is not valid.""" -class ParseError(ScrollException): +class ParseError(ScrollsException): """The config value could not be parsed correctly.""" @@ -22,7 +22,7 @@ class InvalidFileType(ParseError): __all__ = ( - "ScrollException", + "ScrollsException", "NotFoundError", "InvalidFormatError", "ParseError",