
    )'h                     0    d Z dgZ G d de      Zd Zd Zy)zJSON decode error class
Errorc                       e Zd ZdZd Zy)r   a  Subclass of ValueError with the following additional properties:

    msg: The unformatted error message
    doc: The JSON document being parsed
    pos: The start index of doc where parsing failed
    end: The end index of doc where parsing failed (may be None)
    lineno: The line corresponding to pos
    colno: The column corresponding to pos
    endlineno: The line corresponding to end (may be None)
    endcolno: The column corresponding to end (may be None)

    c                     t         j                  | t        |||             || _        || _        || _        t        ||      \  | _        | _        y )N)	
ValueError__init__errmsgmsgdocposlinecollinenocolno)selfr   r	   r
   s       V/home/kushmeetdev/Regenta/Chatbot/venv/lib/python3.12/site-packages/dirtyjson/error.pyr   zError.__init__   sE    D&c3"78")#s"3TZ    N)__name__
__module____qualname____doc__r    r   r   r   r      s    4r   c                 ~    | j                  dd|      dz   }|dk(  r	|dz   }||fS || j                  dd|      z
  }||fS )N
       )countrindex)r	   r
   r   r   s       r   r   r      sX    YYtQ$q(F{a 5= cjjq#..5=r   c           	      x    t        ||      \  }}| j                  dt        |||dz                } d}|| |||fz  S )Nz%rr   z%s: line %d column %d (char %d))r   replacerepr)r   r	   r
   r   r   fmts         r   r   r   &   sK    C%MFE
++dDSq!12
3C
+C#vuc***r   N)r   __all__r   r   r   r   r   r   r   <module>r!      s)    )4J 4,+r   