Source code for valvemdl.exceptions

"""
.. Exceptions
"""


[docs] class MdlError(Exception): """Base class for every error raised by |proj_name|."""
[docs] class MdlVersionUnsupportedError(MdlError): """Raised when a file declares a version this library does not know how to parse.""" def __init__(self, version): super().__init__('Unsupported mdl version ({0})'.format(version)) self.version = version #: :type: (int) - The offending version.
[docs] class MdlSidecarMissingError(MdlError): """Raised when a sidecar file (vvd, vtx) is asked for but was not found next to the mdl.""" def __init__(self, path): super().__init__('Sidecar file not found ({0})'.format(path)) self.path = path #: :type: (str) - The path that was looked for.