All exceptions now derive from DiscordException.
This commit is contained in:
		@@ -24,10 +24,16 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 | 
				
			|||||||
DEALINGS IN THE SOFTWARE.
 | 
					DEALINGS IN THE SOFTWARE.
 | 
				
			||||||
"""
 | 
					"""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class InvalidDestination(Exception):
 | 
					class DiscordException(Exception):
 | 
				
			||||||
 | 
					    """Base exception class for discord.py
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    Ideally speaking, this could be caught to handle any exceptions thrown from this library.
 | 
				
			||||||
 | 
					    """
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					class InvalidDestination(DiscordException):
 | 
				
			||||||
    """Thrown when the destination from :meth:`Client.send_message` is invalid."""
 | 
					    """Thrown when the destination from :meth:`Client.send_message` is invalid."""
 | 
				
			||||||
    pass
 | 
					    pass
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class GatewayNotFound(Exception):
 | 
					class GatewayNotFound(DiscordException):
 | 
				
			||||||
    """Thrown when the gateway hub for the :class:`Client` websocket is not found."""
 | 
					    """Thrown when the gateway hub for the :class:`Client` websocket is not found."""
 | 
				
			||||||
    pass
 | 
					    pass
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -282,9 +282,9 @@ Exceptions
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
The following exceptions are thrown by the library.
 | 
					The following exceptions are thrown by the library.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					.. autoclass:: DiscordException
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.. autoclass:: InvalidDestination
 | 
					.. autoclass:: InvalidDestination
 | 
				
			||||||
    :members:
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.. autoclass:: GatewayNotFound
 | 
					.. autoclass:: GatewayNotFound
 | 
				
			||||||
    :members:
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user