+
    Qi  c                   s  a  R t 0 t R tRtRtRtRtRt^ RIt^ RIt^ RI	t	^ RI
t
^ RIt^ RIHt ^ RIHtHt ^R	IHt R
tRtRtRt^ t]t] ^ k Rt] ^k ]P2                  ! 4       tR R ltRR R lltRR R lltRR R lltRR R lltR# )z?Handles writing debugging messages to the debug file or stderr.z$Id$z
$Revision$z$Date$z-Copyright (c) 2005-2008 Sun Microsystems Inc.ZLGPLN)datetime)AnyTextIO)AXUtilitiesDebuggingi'  i  i  i   c                s(    V ^8  d   QhR\         RR/# )   levelreturnN)intZformat   "//usr/lib/python3.14/site-packages/orca/debug.py__annotate__r   6   s      3 4     c                s    V \         8  d4   \        V 4       \        P                  ! ^d\        4       \        V 4       R# R# )z7Prints out information regarding the current exception.N)
debugLevel_print_text	tracebackZ	print_exc	debugFile)r   s   &r
   print_exceptionr   6   s/    
EC+E r   c          
      sb    V ^8  d   QhR\         R\        \        ,          R\        R\        RR/# )r   r   tokens	timestampstackr   N)r   Zlistr   boolr   r	   r
   r   r   =   s8     
/ 
/
/S	
/.2
/CG
/	
/r   c                s    V \         8  d   R# RP                  \        \        P                  V4      4      p\
        P                  ! RRV4      p\        WW#4       R# )z3Prints out each token as a human-consumable string.N z (?=[,.:)])(?![\n]) )r   joinmapr   	as_stringreZsubr   )r   r   r   r   text   &&&& r
   print_tokensr   =   sH    
 z88C,66?@D66("d3DY.r   c          
      L    V ^8  d   QhR\         R\        R\        R\        RR/# r   r   r   r   r   r   Nr   strr   r   r	   r
   r   r   I   s0     / / /C /D / /Z^ /r   c                s8    V \         8  d   R# \        WW#4       R# )zPrints out text.N)r   r   )r   r   r   r   s   &&&&r
   print_messager#   I   s     zY.r   c                s0    V ^8  d   QhR\         R\        /# )r   
max_framesr   )r   r"   r   r	   r
   r   r   Q   s     D D DS Dr   c                 s   . p\         P                  ! \         P                  ! 4       4      p\         P                  ! 4       p\	        ^\        V4      4       Fz  pW4,          p\         P                  ! V^ ,          4      pWb8X  d   K0  VP                  R8X  d   KC  Ve   VP                  f   KW  VP                  V4       \        V4      V 8  g   Kz   M	  VP                  4        RP                  \        \        P                  V4      4      # )i   Zmainz > )inspectZ	getmoduleZcurrentframer   ZrangeZlenZfunctionZ__name__ZappendZreverser   r   r   r   )r$   ZcallersZcurrent_moduler   ZiZframeZmodules   &      r
   _stack_as_stringr&   Q   s    G&&w';';'=>NMMOE1c%j!""58,#>>V#>V__4uw<:% " OO::c.88'BCCr   c          
      r   r    r!   r   r	   r
   r   r   e   s0     # #s ## #t #D #]a #r   c                 sX   V \         8  d   R # \        \        RR4      '       d   R # R\        n        V'       d?   VP	                  RRR
 24      p\
        P                  ! 4       P                  R4       RV 2pV'       d   VR\        4        2,          p\        '       d    \        P                  VR.4       M" \         P"                  P                  VR.4       R\        n        R #   \        \        3 d    R\        n         R # \        \        \        3 d'   pRT 2p\        P                  TR.4        R p?LbR p?ii ; i  \        \        3 d    R\        n         R # \        \        \        3 d1   pR	T 2p\         P"                  P                  TR.4        R p?LR p?ii ; i)NactiveFTZ
r   z%H:%M:%S.%fz - z(Exception trying to write text to file: z*Exception trying to write text to stderr: z                  )r   Zgetattr	_printingr'   Zreplacer    ZnowZstrftimer&   r   Z
writelinesZAttributeErrorZOSErrorZ	TypeErrorZ
ValueErrorZUnicodeEncodeErrorsysZstderr)r   r   r   r   Zerrorr   r
   r   r   e   sg   z y(E**I||DBxj/2,,.))-89TFC!$&'((y	/  $.	0JJ!!4,/ I! ( 	$I:'9: 	/=eWED  $..	/ ( 	$I:'9: 	0?wGDJJ!!4,//	0sH   !C( :!E (EEED==EF)$F)8F)9&F$$F)c                sv    V ^8  d   Qh/ ^ \         9   d
   \        ;R&   ^\         9   d   \        R,          ;R&   # )r   r   Nr   )__conditional_annotations__r   r   r   r	   r
   r   r      s2     E E4  C 5 F6   6D= 7 Fr   )FF)i   )r   FF)!r*   Z__doc__Z__id__Z__version__Z__date__Z__copyright__Z__license__r%   r   r   r)   Z	threadingr    Ztypingr   r   Zax_utilities_debuggingr   Z	LEVEL_OFFZLEVEL_SEVEREZLEVEL_WARNINGZ
LEVEL_INFOZ	LEVEL_ALLr   r   Zlocalr(   r   r   r#   r&   r   r   )r*   s   @r
   <module>r+      s   , F?   	 
    8	
	 
 	  OO	
//D(# #r   