+
     h  c                   s.   R t ^ RIt ! R R]4      t ! R R]4      t ! R R]4      t ! R R	]4      t ! R
 R]4      t ! R R]4      t	 ! R R]4      t
]R8X  d    ]! ]P                  P                  4      hR#   ] d   t]! ]4        RtAR# RtAii ; i)a  Smartcard module exceptions.

This module defines the exceptions raised by the smartcard.pcsc modules.

__author__ = "https://www.gemalto.com/"

Copyright 2001-2012 gemalto
Author: Jean-Daniel Aussel, mailto:jean-daniel.aussel@gemalto.com

This file is part of pyscard.

pyscard is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.

pyscard is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License
along with pyscard; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
Nc                   sF   a a ] tR t^t oRtRV 3R lltV 3R ltRtVtV ;t	# )BaseSCardExceptionzBase class for scard (aka PCSC) exceptions.

scard exceptions are raised by the scard module, i.e.
low-level PCSC access to readers and cards.

c                sX   < V'       g   Rp\         SV `  ! V.VO5!   W n        Wn        R# )z.Constructor that stores the pcsc error status.zscard exceptionN)super__init__messagehresult)selfr   r   Zargs	__class__s   &&&*D/usr/lib64/python3.14/site-packages/smartcard/pcsc/PCSCExceptions.pyr   ZBaseSCardException.__init__'   s'    'G(4(    c                s   < \         SV `  4       pV P                  R8w  dU   V P                  pV^ 8  d
   VR,          pVR\        P                  P                  V P                  4       RVR R2,          pV# )z1Returns a string representation of the exception.l        z: z (0xZ08XZ))r   __str__r   	smartcardscardZSCardGetErrorMessage)r   Ztextr   r   s   &  r   r
   ZBaseSCardException.__str__/   sm    w <<2llG{;&b==dllKLDQXY\P]]^__Dr   )r   r   )r	    )
__name__
__module____qualname____firstlineno____doc__r   r
   __static_attributes____classdictcell____classcell__r   Z__classdict__   @@r   r    r       s     	 	r   r    c                   s:   a a ] tR t^;t oRtRV 3R lltRtVtV ;t# )AddReaderToGroupExceptionzCRaised when scard fails to add a new reader to a PCSC reader group.c                sl   < \         SV `  R V,           R,           V,           VR7       W n        W0n        R# )zFailed to add reader: z to group: r   r   N)r   r   
readername	groupnamer   r   r   r   r      &&&&r   r   Z"AddReaderToGroupException.__init__>   s6    ,z9MIIU 	 	
 %"r   r   r   r   r   	r   r   r   r   r   r   r   r   r   r   r   r   r   r   ;   s     M# #r   r   c                   s6   a a ] tR t^Gt oRtV 3R ltRtVtV ;t# )EstablishContextExceptionz8Raised when scard failed to establish context with PCSC.c                *   < \         SV `  R VR7       R# )zFailed to establish contextr   Nr   r   r   r   r      &&r   r   Z"EstablishContextException.__init__J   s    !>Pr    r    r   r   r   r!   r!   G   s     BQ Qr   r!   c                   s6   a a ] tR t^Nt oRtV 3R ltRtVtV ;t# )ListReadersExceptionz)Raised when scard failed to list readers.c                r"   )zFailed to list readersr   Nr#   r$   r%   r   r   ZListReadersException.__init__Q   s    !97Kr   r&   r    r   r   r   r'   r'   N   s     3L Lr   r'   c                   s:   a a ] tR t^Ut oRtRV 3R lltRtVtV ;t# )IntroduceReaderExceptionz:Raised when scard fails to introduce a new reader to PCSC.c                sD   < \         SV `  R V,           VR7       W n        R# )z"Failed to introduce a new reader: r   N)r   r   r   )r   r   r   r   s   &&&r   r   Z!IntroduceReaderException.__init__X   s&    8:Ew 	 	
 %r   )r   )r   r    r   r   r   r(   r(   U   s     D% %r   r(   c                   s6   a a ] tR t^_t oRtV 3R ltRtVtV ;t# )ReleaseContextExceptionz1Raised when scard failed to release PCSC context.c                r"   )zFailed to release contextr   Nr#   r$   r%   r   r   Z ReleaseContextException.__init__b   s    !<gNr   r&   r    r   r   r   r)   r)   _   s     ;O Or   r)   c                   s:   a a ] tR t^ft oRtRV 3R lltRtVtV ;t# )RemoveReaderFromGroupExceptionzDRaised when scard fails to remove a reader from a PCSC reader group.c                s   < \         P                  W4       W n        W0n        \        SV `  R V,           R,           V,           VR7       R# )zFailed to remove reader: z from group: r   N)r    r   r   r   r   r   r   r   r   Z'RemoveReaderFromGroupException.__init__i   sO    ##D2$"/   	 	
r   r   r   r    r   r   r   r*   r*   f   s     N

 

r   r*   Z__main__)r   Zsmartcard.scardr   Z	Exceptionr    r   r!   r'   r(   r)   r*   r   r   ZSCARD_E_NO_MEMORYZexcZprintr&   r   r   <module>r+      s   6  8	# 2 	#Q 2 QL- L%1 %O0 O
%7 
  z'	(I(IJJ   c

s   A: :BBB