U
    ÝZßfV  ã                   @   s   d dl Z G dd„ deƒZdS )é    Nc                       s2   e Zd ZdZd	‡ fdd„	Zdd„ Zdd„ Z‡  ZS )
ÚInvalidSpecz=Raise this to indicate there was an error in a specification.Nc                    s\   t t| ƒ ¡  t|tjƒs&tt|ƒƒ‚t|tjtdƒfƒsFtt|ƒƒ‚|| _	|| _
|| _dS )zÏ
        Args:
            msg: Error message intended for the spec writer to read.
            lineno: The line number the error occurred on.
            path: Path to the spec file with the error.
        N)Úsuperr   Ú__init__Ú
isinstanceÚsixÚ	text_typeÚAssertionErrorÚtypeÚinteger_typesÚmsgÚlinenoÚpath)Úselfr   r   r   ©Ú	__class__© ú</tmp/pip-unpacked-wheel-vqb3mfeu/stone/frontend/exception.pyr      s     zInvalidSpec.__init__c                 C   s   t | ƒS )N)Úrepr©r   r   r   r   Ú__str__   s    zInvalidSpec.__str__c                 C   s   d  | j| j| j¡S )NzInvalidSpec({!r}, {!r}, {!r}))Úformatr   r   r   r   r   r   r   Ú__repr__   s
    ýzInvalidSpec.__repr__)N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   Ú__classcell__r   r   r   r   r      s   r   )r   Ú	Exceptionr   r   r   r   r   Ú<module>   s   