curious.exc¶
Exceptions raised from within the library.
Classes
ErrorCode |
An enumeration. |
Exceptions
CuriousError |
The base class for all curious exceptions. |
Forbidden (response, error) |
Raised when you don’t have permission for something. |
HTTPException (response, error) |
Raised when a HTTP request fails with a 400 <= e < 600 error code. |
HierarchyError |
Raised when you can’t do something due to the hierarchy. |
NotFound (response, error) |
Raised when something could not be found. |
PermissionsError (permission_required) |
Raised when you do not have sufficient permission to perform an action. |
Unauthorized (response, error) |
Raised when your bot token is invalid. |
-
exception
curious.exc.
CuriousError
[source]¶ Bases:
Exception
The base class for all curious exceptions.
-
with_traceback
()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
-
class
curious.exc.
ErrorCode
[source]¶ Bases:
enum.IntEnum
An enumeration.
-
exception
curious.exc.
HTTPException
(response: asks.response_objects.Response, error: dict)[source]¶ Bases:
curious.exc.CuriousError
,ConnectionError
Raised when a HTTP request fails with a 400 <= e < 600 error code.
-
error_code
= None¶ The error code for this response.
-
errno
¶ POSIX exception code
-
filename
¶ exception filename
-
filename2
¶ second exception filename
-
strerror
¶ exception strerror
-
with_traceback
()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
Bases:
curious.exc.HTTPException
Raised when your bot token is invalid.
POSIX exception code
exception filename
second exception filename
exception strerror
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
exception
curious.exc.
Forbidden
(response: asks.response_objects.Response, error: dict)[source]¶ Bases:
curious.exc.HTTPException
Raised when you don’t have permission for something.
-
errno
¶ POSIX exception code
-
filename
¶ exception filename
-
filename2
¶ second exception filename
-
strerror
¶ exception strerror
-
with_traceback
()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
-
exception
curious.exc.
NotFound
(response: asks.response_objects.Response, error: dict)[source]¶ Bases:
curious.exc.HTTPException
Raised when something could not be found.
-
errno
¶ POSIX exception code
-
filename
¶ exception filename
-
filename2
¶ second exception filename
-
strerror
¶ exception strerror
-
with_traceback
()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
-
exception
curious.exc.
PermissionsError
(permission_required: str)[source]¶ Bases:
curious.exc.CuriousError
,PermissionError
Raised when you do not have sufficient permission to perform an action.
Variables: permission_required – The string of the permission required to perform this action. -
errno
¶ POSIX exception code
-
filename
¶ exception filename
-
filename2
¶ second exception filename
-
strerror
¶ exception strerror
-
with_traceback
()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
-
exception
curious.exc.
HierarchyError
[source]¶ Bases:
curious.exc.CuriousError
,PermissionError
Raised when you can’t do something due to the hierarchy.
-
errno
¶ POSIX exception code
-
filename
¶ exception filename
-
filename2
¶ second exception filename
-
strerror
¶ exception strerror
-
with_traceback
()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-