Module aoe2netwrapper.exceptions
aoe2netwrapper.exceptions
This module contains the set of exceptions used in the package.
View Source
"""
aoe2netwrapper.exceptions
-------------------------
This module contains the set of exceptions used in the package.
"""
class Aoe2NetError(Exception):
"""Default exception for AoE2.net API interaction."""
class RemovedApiEndpointError(Exception):
"""Exception raised when an API endpoint is removed from AoE2.net."""
def __init__(self, endpoint: str) -> None:
msg = f"The API endpoint for '{endpoint}' has been removed from AoE2.net."
super().__init__(msg)
class NightBotError(Exception):
"""Default exception for AoE2.net Nightbot API interaction."""
Classes
Aoe2NetError
class Aoe2NetError(
/,
*args,
**kwargs
)
Default exception for AoE2.net API interaction.
View Source
class Aoe2NetError(Exception):
"""Default exception for AoE2.net API interaction."""
Ancestors (in MRO)
- builtins.Exception
- builtins.BaseException
Class variables
args
Methods
add_note
def add_note(
...
)
Exception.add_note(note) --
add a note to the exception
with_traceback
def with_traceback(
...
)
Exception.with_traceback(tb) --
set self.traceback to tb and return self.
NightBotError
class NightBotError(
/,
*args,
**kwargs
)
Default exception for AoE2.net Nightbot API interaction.
View Source
class NightBotError(Exception):
"""Default exception for AoE2.net Nightbot API interaction."""
Ancestors (in MRO)
- builtins.Exception
- builtins.BaseException
Class variables
args
Methods
add_note
def add_note(
...
)
Exception.add_note(note) --
add a note to the exception
with_traceback
def with_traceback(
...
)
Exception.with_traceback(tb) --
set self.traceback to tb and return self.
RemovedApiEndpointError
class RemovedApiEndpointError(
endpoint: str
)
Exception raised when an API endpoint is removed from AoE2.net.
View Source
class RemovedApiEndpointError(Exception):
"""Exception raised when an API endpoint is removed from AoE2.net."""
def __init__(self, endpoint: str) -> None:
msg = f"The API endpoint for '{endpoint}' has been removed from AoE2.net."
super().__init__(msg)
Ancestors (in MRO)
- builtins.Exception
- builtins.BaseException
Class variables
args
Methods
add_note
def add_note(
...
)
Exception.add_note(note) --
add a note to the exception
with_traceback
def with_traceback(
...
)
Exception.with_traceback(tb) --
set self.traceback to tb and return self.