3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-01 01:09:22 +01:00

Move ProtocolError to utils, and link the copy in classes to it

This commit is contained in:
James Lu 2017-08-21 22:20:20 -07:00
parent 89699051d5
commit d28006ae62
2 changed files with 6 additions and 6 deletions

View File

@ -28,12 +28,7 @@ except ImportError:
from . import world, utils, structures, conf, __version__
from .log import *
from .coremods import control
### Exceptions
# XXX: is this the right place to put this class?
class ProtocolError(RuntimeError):
pass
from .utils import ProtocolError # Compatibility with PyLink 1.x
### Internal classes (users, servers, channels)

View File

@ -33,6 +33,11 @@ class InvalidArgumentsError(TypeError):
Exception raised (by IRCParser and potentially others) when a bot command is given invalid arguments.
"""
class ProtocolError(RuntimeError):
"""
Exception raised when a network protocol violation is encountered in some way.
"""
class IncrementalUIDGenerator():
"""
Incremental UID Generator module, adapted from InspIRCd source: