o
    ÌÄ.j–  ã                   @   sL   d Z ddlmZ G dd„ deƒZG dd„ deƒZG dd„ deƒZg d	¢Zd
S )zAll the errors.é    )ÚTimec                       s8   e Zd ZdZdef‡ fdd„Zedefdd„ƒZ‡  ZS )ÚInvalidCalendarz+Exception thrown for bad icalendar content.Úmessagec                    s   || _ tƒ  | j¡ dS )z"Create a new error with a message.N)Ú_messageÚsuperÚ__init__r   )Úselfr   ©Ú	__class__© úQ/home/thesage/.local/lib/python3.10/site-packages/recurring_ical_events/errors.pyr   	   s   zInvalidCalendar.__init__Úreturnc                 C   ó   | j S )zThe error message.)r   ©r   r   r   r   r      ó   zInvalidCalendar.message)	Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ústrr   Úpropertyr   Ú__classcell__r   r   r	   r   r      s
    r   c                       sR   e Zd ZdZdededef‡ fdd„Zedefdd	„ƒZedefd
d„ƒZ	‡  Z
S )ÚPeriodEndBeforeStartz,An event or component starts before it ends.r   ÚstartÚendc                    s   t ƒ  |¡ || _|| _dS )z(Create a new PeriodEndBeforeStart error.N)r   r   Ú_startÚ_end)r   r   r   r   r	   r   r   r      s   
zPeriodEndBeforeStart.__init__r   c                 C   r   )z$The start of the component's period.)r   r   r   r   r   r      r   zPeriodEndBeforeStart.startc                 C   r   )z"The end of the component's period.)r   r   r   r   r   r   "   r   zPeriodEndBeforeStart.end)r   r   r   r   r   r   r   r   r   r   r   r   r   r	   r   r      s    r   c                       s<   e Zd ZdZdedef‡ fdd„Zedefdd„ƒZ‡  ZS )	ÚBadRuleStringFormatz'An iCal rule string is badly formatted.r   Úrulec                    s   t ƒ  |d | ¡ || _dS )z'Create an error with a bad rule string.z: N)r   r   Ú_rule)r   r   r   r	   r   r   r   +   s   
zBadRuleStringFormat.__init__r   c                 C   r   )zThe malformed rule string)r   r   r   r   r   r   0   r   zBadRuleStringFormat.rule)	r   r   r   r   r   r   r   r   r   r   r   r	   r   r   (   s
    r   )r   r   r   N)r   Úrecurring_ical_events.typesr   Ú
ValueErrorr   r   r   Ú__all__r   r   r   r   Ú<module>   s    