Exceptions¶
gd.py has stable exception system, which leads better understanding of errors. Below is a list of current existing exceptions.
Exception List¶
-
exception
gd.GDException[source]¶ Base exception class for gd.py. This could be caught to handle any exceptions thrown from this library.
-
exception
gd.ClientException[source]¶ Base exception class for errors that are thrown when operation in
Clientfails.
-
exception
gd.EditorError[source]¶ Exception that is raised when converting string to
api.Objectorapi.Editorfailed.
-
exception
gd.HTTPError(exc: Exception)[source]¶ Exception that is raised when exception in
utils.http.HTTPClientoccurs.
-
exception
gd.MissingAccess(message: Optional[str] = None)[source]¶ Exception that is raised when server responses with -1.
-
exception
gd.SongRestrictedForUsage(id: int)[source]¶ Exception that is raised when server returns -2 when looking for a song.
-
exception
gd.LoginFailure(login: str, password: str)[source]¶ Exception that is raised when server returns -1 when trying to log in.
-
login¶ Username that was wrong or password did not match.
-
password¶ Password that login was failed with.
-
Exception Hierarchy¶
GDException (Exception)
EditorError
ClientException
HTTPError
MissingAccess
SongRestrictedForUsage
LoginFailure
NothingFound
NotLoggedError