ELF>@@8@@@@tt00 ))HH ;;z`~ ))@@Rtd ))HPQtd';lM );(;y M  ^,20N:yj՗j  jl_f__call_latestjulia__gnu_h2f_ieeejulia__gnu_f2h_ieeejulia__truncdfhf2jl_RTLD_DEFAULT_handle_pointerjl_RTLD_DEFAULT_handlejl_image_pointersjl_system_image_datajl_system_image_sizelibjulia-internal.so.1.10JL_LIBJULIA_1.10libjulia.so.1.10;;;;( ;(;0;8;@; P;@X;H`;P;h;;;;P;;`;) v) _@: Aa ! 0genericyzRx CAC ~ $<<AC Ct d AK| AK AK AK AKUHH IEH@HHH HEHMH}Hu1H ]ffff.UHAUSHHoHtdH %L, DIH;y[A]]@PfeXPfUXPZfXPJfXPJfX5z%|@%zh%rh%jh%bh oX`ش  o(Tooojli  Linuxx86_641.10.3v1.10.30b4590a5507d3f3046e5bafc007cacbbfc9b310bsyCoremуJ5Basemу]J5MainmуJ5ArgToolsBń x(mуF K5 Artifactsmr-V3|mу K5Base64UlD*_mу> K5CRC32c\y.jmуj K5 FileWatchingXzsy`{,zmуh& K5LibdluVW59˗,mу-" K5LoggingT{VhUXM=mуrU" K5MmapP~:xg,Omу|' K5NetworkOptionsC0YW,mуʠ, K5SHAQ<$!<%mу1 K5 Serialization [)*k1mу-G K5Sockets1V$ bdސݗmуYBY K5UnicodeP>I>Nrmуeszo K5 LinearAlgebraSm7̏mуuux K5 OpenBLAS_jll[(Śb6EcQ FmуDux K5libblastrampoline_jllLSۆ }lxӠmу^} K5MarkdownZPn7z`smу/Ed~ K5Printfg^cX׸QDmу;h K5Random_ɢ?\Ymу? K5TarOi>աmу!t, K5DatesEY8pj2 mуX K5FuturebS;3{I xVMmуsD K5InteractiveUtilsWL ~@'ZmуVg K5LibGit2Z[&RPTv3EКRmу8J K5 LibGit2_jll YXg}]$mуD K5 MbedTLS_jllAX 3ȡ_mу- K5 LibSSH2_jlloTZk)߆0>==@=<<5P2*#p @p@ @@@@@@@@@@@@@@@ `pP . `  ʃjp ` p0F!A5 `@ @@@N ` `@ @   ` ` ` `f._`p.. `  `p@. `@ -j` P]٣`@ @`@N` `` @  0 ` ``` `Pf.Pha..0aP`Z! .p. `p#B ``@. `  dHj`` ` MI`@ @0@N` `0<  @   ` `` ` Pf.#lza`..a `Z! .p@. `@. `P 0 *T`㑉!0 P 0 `  Nvdɺ|y``Z! .`Z! . p . `p !!@ i5xj ` !F7`!@ @#@0"N` `#X H 0##@D  `#` `` `f.##_3` .@$ $#. `#$$[ R-j@$` @$%+/Py``%@  ('@%N` `'r b &&@^  &``` `(0'f.p'p'Ha@$.'.'a(`Z! .@)@p(N` `) z p)@)@v  )` `*)f. * *Ha@$*P*.*a*`Z! . ++*. `*p+`+ ߈Fj +` ++p6E*\ `@,@ @.-@,N ` `u-  -`-@  -` ` `f. . . Uv +ljP0/@.N ` `t/  /`/@  / `` ` `f.0000 Ϩv +p@1@0N ` `p1  1p1@  1 ` `f.02022t` +.22P2. !`P222 j2!` 2`3> Yj4 `3@ @`5@4N ` ``5  54@  @5 ` ` `f.55`2.655. "`5`6P6 (`=`> )`0>>>>. *`> ?? 9j>*` >?xڈ`?@ @0B@@@N` `q0B & @AA@  pA ` ` B`+`)`,`(`-`.`/`  0`$`1`2`3`4```D`f.pBpB`>....?BB. `B0C 5`CC 6`PCC 7`C D 8`CpD0n 9`@DDDD. :`D0E E  jD:` DE4l[m`F@ @H@PFN` `^H  PG G@  G;`8`H`/`  +`<`5`=` >```D`f.PHPH5`D..J} . EHH. `HI^'k ?`HI`I0I. @`0III IpjI@` I@Jܤ56\`J@ @`L@JN` `Z`L  KK@  LPLA` ```D`f.LLi`I..p.IML. `L`M0M. `0MMM. `MN B`MPN C` NNNpN. D`pNOO LjND` NOi%-'E`O@ @Q@0PNE` `;QV  0QQ@  `Q  C`=`QF`/` Q`E``D`DG`f. R RB$a4`N.`R.TRRb 1j`RH` `R SsA`S@ @ U@SNA` `; Ux j TT@f  UE`A``f.`U`U``R.TOUU. E`U`RVU. H`U`V I`0VV =`VW J`VpWPW W. K` WWW{ jpWK` pW0XgqL`X@ @PZ@XNL` `.PZ  YY@~  Z+`J`=` M`L``f.ZZU`pW.Z.. [[ >jZN` Z[Nùܢ-`[@ ^]@@\N-` `.]  @]]@  p]L`-``f.]]e!`Z..@_@P^N-` ` _  P_ _@  _O`P`-``f.__7+Y`Z. `.Wp`@`. L`@````. Q``0a a dnj`Q` `a kR`b@ @c@PbNR` `*cB * Pc c@"  cc-`& R``XG``f.dd(``..pd.Pd.ddH jpdS` pd0eIǖ/`e@ @@g@eN/` `*@gb P ff@L  gR`P`/``f.gg5c`pd.g. ahg. R`gpdPh h. S` hdhph. /`phh M`h@i T`ii U``ii V`i0j W`jj X`Pjj Y`j kF Z`jkpk@k. [`@kkke ^)jk[` kPl!bjH#O`l@ @n@mNO` ` n p nm@h  0n+`l pnM`O``DG`f.nnI`k..Z.o.kPo o. O` oZopo. N`poRoo. A`o@p \`p[p`p. -``ppB ]`p0q ^`qq _`Pqqqq. ``q@r0r @jq`` qr.xȾ a`s@ 0ut@`sNa` `t  `t0t@  tb`_`a``f.uuu entqww@uNa` `w  vPv@  vwc`-`d`A`a``DG`f.PwPwv1W_`q.T@ y@wNa` ` y  xx@  y_`a``f.`y`yB`q.@yy. <`y zy. >`y  Pz z. d` zzB e`pzz2= f`z@{ g`{{ h``{{ i`{0| j`|| k`P|| l`| } m`|p} n`@}} o`}~4 p`}`~ q`0~~~~. r`~ % F\j~r` ~yU{s`@ @@@Ns` t`* , @@(  pu``#``n`v`w`x`y`z`{`4)|`}`s`t`f.@@`~n9)..p. s`p` ~`@d ` `` `0 ` `PЄ `@ . ` -Pj@` @aƊ觝C``@ @Љ@N` t`Љ<  @   ````t````p`u````s``` @` 0`(t`` q```f.QV`@(..) `PЊT) v` ) y`p) u`@) `4). `0r`0. a`0. `!Ќ. `Ќ$P . ` 2p. `pP6. #``+@. ``. ``.Ў  @ `@ pP070.P  Z! J7Г@3 0Z!  3@F 2 `,````` R V 7 Z! 2 `70p.  Z! ЕJ7@3 @ pZ!  X@p 2 `,P````` |  7`Z! 2 `7.И  pJ7P@03 ` p K@@ 2 `,`````   f.ɑ:s`.p.7p2 `7 `.  Z! J7@3Р0 `Z!  @ 2 `,@`````   7PZ! 2 `7`.  Z! J7@@ 3Pp Z!  _@0d 2 `,````` p t 7Z! 2 `7. 0  @J7@`3P  @p 2 a`,`````  *D*@f. ! `.Tf.q`.7Ъ2 a`7 .@ p  Z! J7@3Э Z!  @ 2 #`,`````  7Z! 2 #`7`.  J7@3в0 ` @J 2 `,@````` V Z f.``UYv`..7 2 `7.  P  Z! `J7@3pе Z!  ;@ 2 `,`````  7Z! 2 `Pjc ` f `p+S `@~W `B ``> `0ts ` `Pк. `@0F CYj` g2nd`p@  @  P@@v`4.J @N` `f Z `0@V  ` `f.nr<`.f.PPi 7v@`@`@N` `` r @n  @` `f. }`.0. `pP . `  Njp` p0Ai`@ @0@N` `0 @  `` `f.ppHl`p.. ` . `N` `^ 0@  `````D`f. e%`qjL.J} .N` `q @  P````D`f.LF `qjL...N-` ` :  @  @G`P``O`-``XG``f.DW`qjLZ. .N-` `.j D @@@  p`L`-``D`f.+`qjLZ..N/` `* t 0@p  `G`P``R`/``XG``f.?-`qjLpd.@.NA` `;  `0@  `E`A``D`f.W`qjL`R.TN` `g  P @  ` `f.}Q`. @.إa*T㑉! `Z! .`Z! .N` `i  @@  p` `0f.}Qa0.pإa0 *T㑉!00 `Z! .`Z! .   x 7. 049 76 I. L49 73 IV9 7. K i .! -! -!e 6 3 A! A9 77?/#9 79 7,Z?!#unused#ioe_unused_prefix 7\ A9 7V7?/#9 79 7,q?#self#ioexcstack 7\ A9 7V7?/#9 79 7,^?#self#ioestack 7\ A9 7V7?/#9 79 7,Z?#self#ioe_unused_dlv$SMcoB:L[PW"U7@r#_wmj1-u/9s^0;DVZf8=*gp3 &In`XaG 5CJR?k)%t4 AqT2xOQ,Hbh ' 7 I-9 76-9 7 I. w-63.!N- I.  - I37?/#9 79 7,/#9 79 7,/#9 79 7,/#9 79 7,? #self#ee 7+ I.w d-k6-9 76-9 7 I. w-6 3.!N- I.  - I3.w d67. K9 7 d--U7++?/#9 79 7,/#9 79 7,/#9 79 7,/#9 79 7,/#9 79 7,/#9 79 7,?#self#e#unused#e 78 I.w d-k6-9 76-9 7 I. w-6 3.!N- I.  - I3.w d7?/#9 79 7,/#9 79 7,/#9 79 7,/#9 79 7,?#self#e#unused#e 7c!9 7-9 7-7?/#9 79 7,? #self#e 7h!9 7-9 7. d7?/#9 79 7,?#self#e#unused# 7=7?/#9 79 7,?#self#e#unused# 7P.!J49 77?/#9 79 7,u? #self#e  7d.!J49 7.!J49 77?/#9 79 7,t? #self#e 7<7?/#9 79 7,p? #self#e 7X-9 7.?7?/#9 79 7,? #self#e 7h!9 7-9 7. d7?/#9 79 7,?#self#e#unused# 7;7>?/#9 79 7,w?#self##unused##unused# 7no stacktrace available+O?     -9 76 + I-9 79 7. K i- F- A 9 77 I AQ49 7 I A9 7.!J49 7.-9 79 7. K i- F- A 9 7- I A!- I-!P". O?-!Z$6%+7 I. L'. L'.!J49 7 .{.!M+ I -*,-e -k.6/+23+7 I.!P"). O?-!Z364+73+'-e 67+;.9 7 9 7 79.!M .!l; I . L< I. L< A!l; I . L?.!J49 7 I -4A.!J9 7 49 7.!J9 7 49 7.!J49 7-DE I -CF.!J49 7  .X AHIJKL -7N+O+O?+/#9 79 7,v/#9 79 7,w/#9 79 7,x/#9 79 7,|/#9 79 7,/#9 79 7,/#9 79 7,/#9 79 7,/#9 79 7,/#9 79 7,/#9 79 7,/#9 79 7,/#9 79 7,/#9 79 7,/#9 79 7,/#9 79 7,/#9 79 7,/#9 79 7,/#9 79 7,/#9 79 7,/#9 79 7,/#9 79 7,? v#_summarize_exception#7prefixioexcstackmodulecolorcyclermodulecolordictnframebtexc_ioindentunwrappedi 7.  tasks):CompositeException ( +?? I -^.Q6.!J49 7-9 79 7. K i - F-  A  9 7  7-^9 7. K i- F- A 9 7 9 79 7 I AQ 49 7 .X9 7.49 7 I .9 7 .!J49 7-9 7  I-!P. O?-!Z6+? . L".!l# I . L$ I . L$ A!l# I . L'. L"9 7. K i*.!y 9 7 - F,-+- A .9 7   .!J49 7-^1.v0263+: .X.49 76 I .9 7 57.9 7 9 7 I.!P). O?-!Z;6<+?3+!7?+?+??/#9 7 9 7,`/#9 7 9 7,a/#9 7 9 7,d/#9 7 9 7,e/#9 7 9 7,f/#9 7 9 7,g/#9 7 9 7,h/#9 7 9 7,j/#9 7 9 7,k/#9 7 9 7,l/#9 7 9 7,n? C#_summarize_exception#6prefixioestackindentexisep_ioio 7?9 7. K i- F-9 7.!J49 7 A 7?/#9 79 7,\?.#_summarize_exception#5prefixioe_unused_ 7 which caused: ++? I  I-9 7-9 7 I-!P. O?-!Z6++. L .!l I . L I . L A!l  . L.!l I . L I. L A!l I . L. L .v 6+!- I V9 7. K i.!J49 7 A- F- A 9 79 79 7. K i!- F -"# A $9 7  I.!P. O?-!Z'6(++37?++++?/#9 79 7 ,</#9 79 7 ,=/#9 79 7 ,>/#9 79 7 ,@/#9 79 7 ,B/#9 79 7 ,C/#9 79 7 ,E/#9 79 7 ,F?R#_summarize_task_exceptions#4prefixiotaskexception_stackstackeiprefix 7X A9 7V7?/#9 79 7,;?#self#iotask 7  +(? I AQ49 7-9 7-9 7 I-!P. O?-!Z6+( . L .!l I . L I. L A!l  I . L. L .?V6+.Q 6+-^.[ I ..9 7 A9 7 3+#.? 6+!-3+!.9 7 A9 7! I.!P. O?-!Z$6%+(37?+(+(?/#9 79 7,//#9 79 7,0/#9 79 7,1/#9 79 7,2/#9 79 7,3/#9 79 7,5/#9 79 7,6/#9 79 7,8?7#_indent_print#3prefixioio_srcindentlineiind 7X A9 7V7?/#9 79 7,.?#self#ioio_src 7x9 7 A F49 7V A }!P7?/#9 79 7, ? #self#iox 7 ?9 7. K i. F- A F9 7- F9 7 A }!P 7?/#9 79 7,+?&#_indent_println#2colorprefixiox 7x9 7 A F49 7V A }!P7?/#9 79 7,*? #self#iox 7 +? I AQ49 7.?V6-^.[ I..9 79 7. K i - F-  A F9 7  A }!P 7.9 79 7. K i- F- A F9 7 A }!P 7++?/#9 79 7,!/#9 79 7,"/#9 79 7,#/#9 79 7,$/#9 79 7,&?/#_indent_print#1colorprefixioxindindent 7jH.!J49 7 A9 7.7?/#9 79 7,?#self# 7'9 7. K i.!J49 7 A- F- A 9 79 79 7 -.9 77V?/#9 79 7,/#9 79 7,/#9 79 7,/#9 79 7,?#self#iotask 7WH A9 7.7?/#9 79 7,? #self#io--=== EXCEPTION SUMMARY === 7 +:??.w9 76+3 I= I.!J49 7.w6 I.9 73+,-.9 76+,- I.9 7 I>-9 7.{ I-!P. O?-!Z6+, I . L. L.L .L . !-k"6#+' I=3+, I.!P. O?-!Z(6)+,3+6+/ I A9 749 7VV3+2.!J49 7 I A9 749 7 /03+6V.!J49 7 I A9 749 7 349 7 9 7 9 7 9 7 A7.6879+:+:?/#9 79 7,+/#9 79 7,-/#9 79 7,./#9 79 7,//#9 79 7,0/#9 79 7,2/#9 79 7,3/#9 79 7,4/#9 79 7,5/#9 79 7,6/#9 79 7,7/#9 79 7,8/#9 79 7,:/#9 79 7,=/#9 79 7,>/#9 79 7,@/#9 79 7,C/#9 79 7,E? 8#self#resultorig_exprextypetestresexcsuccessfld 7+?? I.Z49 7--9 7 A 4A49 74V A 49 749 7- A 4A4v49 7 49 7 A 49 7  49 7 A 49 7   -9 7 A 4A49 7 49 7 4V A 49 749 7 4!9 7 A 49 7 49 7  I A 49 749 7.!J49 7 -- A 4A49 77++?/#9 79 7,/#9 79 7,/#9 79 7,$/#9 79 7,%?6#self#__source____module__extypeexresultorig_exH/opt/julia/packages/ExceptionUnwrapping/kba8L/src/ExceptionUnwrapping.jlڻ is_wrapped_exception(e)::Bool Returns true if the given exception instance, `e` is a wrapped exception, such that `unwrap_exception(e)` would return something different than `e`. H/opt/julia/packages/ExceptionUnwrapping/kba8L/src/ExceptionUnwrapping.jlڻ unwrap_exception_until(e, ExceptionType)::ExceptionType Recursively unwrap a wrapped exception `e` until reaching an instance of `ExceptionType`. F/opt/julia/packages/ExceptionUnwrapping/kba8L/src/exception_summary.jlڻ~ _summarize_exception(io::IO, e::TaskFailedException, _) _summarize_exception(io::IO, e::CompositeException, stack) _summarize_exception(io::IO, e::Exception, stack) The secret sauce that lets us unwrap TaskFailedExceptions and CompositeExceptions, and summarize the actual exception. TaskFailedException simply wraps a task, so it is just unwrapped, and processed by _summarize_task_exceptions(). CompositeException simply wraps a Vector of Exceptions. Each of the individual Exceptions is summarized. All other exceptions are printed via [`Base.showerror()`](@ref). The first stackframe in the backtrace is also printed. H/opt/julia/packages/ExceptionUnwrapping/kba8L/src/ExceptionUnwrapping.jlڻ# ExceptionUnwrapping.jl `ExceptionUnwrapping.jl` provides exception handling utilities to allow inspecting and unwrapping "wrapped exceptions," by which we mean any Exception type that itself embeds another Exception. The most common example is a `TaskFailedException`, which wraps a `Task` and the exception that caused that Task to fail. Another example is the exception types in [Salsa.jl](https://github.com/RelationalAI-oss/Salsa.jl). ## API - `has_wrapped_exception(e, ExceptionType)::Bool` - `is_wrapped_exception(e)::Bool` - `unwrap_exception(exception_wrapper) -> wrapped_exception` - `unwrap_exception(normal_exception) -> normal_exception` - `unwrap_exception_until(e, ExceptionType)::ExceptionType` - `unwrap_exception_to_root(exception_wrapper) -> wrapped_exception` - `unwrap_exception_to_root(normal_exception) -> normal_exception` ## Usage If your library provides a wrapped exception type, you should register it with this package by simply adding a method to `unwrap_exception`: ```julia ExceptionUnwrapping.unwrap_exception(e::MyWrappedException) = e.exception ``` In client code, you should use `has_wrapped_exception` and `unwrap_exception_until` in catch blocks: ```julia try ... catch e if has_wrapped_exception(e, BoundsError) be = unwrap_exception_until(e, BoundsError) # ...Use BoundsError... else rethrow() end end ``` Finally, you can improve robustness in client tests via `@test_throws_wrapped`: ```julia @test_throws_wrapped AssertionError my_possibly_multithreaded_function() ``` ## Motivating Example: Stable Exception Handling ### A Problem: Adding Concurrency to a Library Can Break Users' Exception Handling As we all start using concurrency more, exception handling can get a bit weird. Julia's cooperative multithreading is designed to be _composable_ as a fundamental principle, but changing syncronous code to run concurrently in a `Task` **changes the types of Exceptions that code will throw!** Consider for example this silly program, which wants to handle a certain type of Exception (`BoundsError`s) in order to take meaningful action (ask the user to try again): ```julia function get_and_sort_names_by_first_letter(n) try names = [readline() for _ in 1:n] # Use this libary's sort function because it's supposed to be wicked fast 🤘 return library_sort(names, by=a->a[1]) catch e if e isa BoundsError println("Oops! You entered an empty name. Please try again!") # Give the user another shot return get_and_sort_names_by_first_letter(n) else rethrow() # Unknown error end end end ``` All is well and good: ```julia julia> get_and_sort_names_by_first_letter(2) Valentin Oops! You entered an empty name. Please try again! Valentin Jane 2-element Array{String,1}: "Jane" "Valentin" ``` But what happens if that library decides to _parallelize its sorting function_, so now its even wicked faster? (🤘🤘?) ```julia # lol, well, this won't make it any faster, but it demonstrates the point. library_sort(args...; kwargs...) = fetch(Threads.@spawn sort(args...; kwargs...)) ``` _What happens_ is the library has inadvertently broken its caller: ```julia julia> get_and_sort_names_by_first_letter(2) Nathan ERROR: TaskFailedException: BoundsError: attempt to access String at index [1] Stacktrace: [1] checkbounds at ./strings/basic.jl:193 [inlined] [2] codeunit at ./strings/string.jl:89 [inlined] [3] getindex at ./strings/string.jl:210 [inlined] [4] #10 at /Users/nathan.daly/.julia/dev/ExceptionUnwrapping/src/ExceptionUnwrapping.jl:125 [inlined] [5] lt(::Base.Order.By{var"#10#12"}, ::String, ::String) at ./ordering.jl:51 [6] sort!(::Array{String,1}, ::Int64, ::Int64, ::Base.Sort.InsertionSortAlg, ::Base.Order.By{var"#10#12"}) at ./sort.jl:468 [7] sort!(::Array{String,1}, ::Int64, ::Int64, ::Base.Sort.MergeSortAlg, ::Base.Order.By{var"#10#12"}, ::Array{String,1}) at . ``` The library never promised to return a `BoundsError`, so it can't know it's supposed to handle and unwrap any TaskFailedException it encounters; maybe the user _would want to see_ the TaskFailedException. And the user's code felt comfortable depending on the `BoundsError`, since it's coming from the lambda it provided directly, so it thought it would know what kind of exceptions could be produced. And since this code path is _error handling_, it's quite possibly it's poorly tested! What a conundrum! And so, we present here a solution: `ExceptionUnwrapping.jl` ### The Solution: ExceptionUnwrapping.jl If the user always structures their execption checks using ExceptionUnwrapping, then it will continue working despite any changes to the underlying concurrency model: ```julia function get_and_sort_names_by_first_letter(n) try names = [readline() for _ in 1:n] # Use this libary's sort function because it's supposed to be wicked fast 🤘 return library_sort(names, by=a->a[1]) catch e # Use ExceptionUnwrapping's check to see whether `e` either _is_ a BoundsError _or_ # if it is _wrapping_ a BoundsError. if has_wrapped_exception(e, BoundsError) println("Oops! You entered an empty name. Please try again!") # Give the user another shot return get_and_sort_names_by_first_letter(n) else rethrow() # Unknown error end end end ``` Now it will work again, regardless of whether `library_sort` is using Tasks internally or not, which is exactly what we want from composable multithreading! :) ```julia julia> get_and_sort_names_by_first_letter(2) Nathan Oops! You entered an empty name. Please try again! Nathan Martin 2-element Array{String,1}: "Martin" "Nathan" ``` -------------- ## Terminology: ### "Wrapped Exceptions" vs "Exception Causes" In julia, one exception can be "caused by" another exception if a new exception is thrown from within an `catch`-block (or `finally`-block). This is _not_ the situation that this package is addressing. For example: ```julia julia> try throw(ErrorException("1")) catch e throw(ErrorException("2")) end ERROR: 2 Stacktrace: [1] top-level scope at REPL[1]:4 caused by [exception 1] 1 Stacktrace: [1] top-level scope at REPL[1]:2 ``` This is situation already well covered by Julia's standard library, which has functions like `Base.catch_stack()` which will return the above stack of exceptions that were thrown (and is used to print the `caused by` display above). Instead, this package is for dealing with _"wrapped exceptions"_, which is a term we are coining to refer to Exceptions that embed another Exception inside of them, either to add information or context, or because the exception mechanism cannot cross the boundary between Tasks. H/opt/julia/packages/ExceptionUnwrapping/kba8L/src/ExceptionUnwrapping.jlڻ unwrap_exception_to_root(exception_wrapper) -> wrapped_exception unwrap_exception_to_root(normal_exception) -> normal_exception Unwrap a wrapped exception to its bottom layer. F/opt/julia/packages/ExceptionUnwrapping/kba8L/src/exception_summary.jlڻ* summarize_current_exceptions(io::IO = Base.stderr, task = current_task()) Print a summary of the [current] task's exceptions to `io`. This is particularly helpful in cases where the exception stack is large, the backtraces are large, and CompositeExceptions with multiple parts are involved. H/opt/julia/packages/ExceptionUnwrapping/kba8L/src/ExceptionUnwrapping.jlڻ has_wrapped_exception(e, ExceptionType)::Bool Returns true if the given exception instance, `e`, contains an exception of type `T` anywhere in its chain of unwrapped exceptions. Application code should prefer to use `has_wrapped_exception(e, T)` instead of `e isa T` in catch-blocks, to keep code from breaking when libraries wrap user's exceptions. This makes application code resilient to library changes that may cause wrapped exceptions, such as e.g. changes to underlying concurrency decisions (thus maintaining concurrency's cooperative benefits). # Example ```julia try # If this becomes concurrent in the future, the catch-block doesn't need to change. library_function(args...) catch e if has_wrapped_exception(e, MyExceptionType) unwrapped = unwrap_exception_until(e, MyExceptionType) handle_my_exception(unwrapped, caught=e) else rethrow() end end ``` H/opt/julia/packages/ExceptionUnwrapping/kba8L/src/test_throws_wrapped.jlڻU @test_throws_wrapped exception expr Similar to `Test.@test_throws`, but this tests that the expression `expr` either throws `exception`, OR that it throws an expression _wrapping_ `exception`. Users can use this function if they aren't concerned about whether an exception is wrapped or not, e.g. not caring whether the user is using concurrency. # Examples ```jldoctest julia> @test_throws_wrapped BoundsError [1, 2, 3][4] Test Passed Thrown: BoundsError julia> @test_throws_wrapped DimensionMismatch fetch(@async [1, 2, 3] + [1, 2]) Test Passed Thrown: DimensionMismatch ``` H/opt/julia/packages/ExceptionUnwrapping/kba8L/src/ExceptionUnwrapping.jlڻg unwrap_exception(exception_wrapper) -> wrapped_exception unwrap_exception(normal_exception) -> normal_exception # Add overrides for custom exception types ExceptionUnwrapping.unwrap_exception(e::MyWrappedException) = e.wrapped_exception Unwraps a wrapped exception by one level. *New wrapped exception types should add a method to this function.* One example of a wrapped exception is the `TaskFailedException`, which wraps an exception thrown by a `Task` with a new `Exception` describing the task failure. It is useful to unwrap the exception to test what kind of exception was thrown in the first place, which is useful in case you need different exception handling behavior for different types of exceptions. Authors of new wrapped exception types can overload this to indicate what field their exception is wrapping, by adding an overload, e.g.: ```julia ExceptionUnwrapping.unwrap_exception(e::MyWrappedException) = e.wrapped_exception ``` This is used in the implementations of the other functions in the module: - [`has_wrapped_exception(e, ::Type)`](@ref) - [`unwrap_exception_to_root(e)`](@ref) R A !9 787@@`?'//#9 7? 7L A !9 77?/#9 7? #self#x 7P A !9 77?/#9 7?#self#mapexprx 7X. 9 79 77?/#9 79 7? #self#x 7. 049 76 I. L49 73 IV9 7. K i .! -! -!e 6 3 A! A9 77?/#9 79 7,^?#unused#ioestackprefix 7. 049 76 I. L49 73 IV9 7. K i .! -! -!e 6 3 A! A9 77?/#9 79 7,q? #unused#ioexcstackprefix 7+. 049 76 I. L49 73 I49 7. 049 76 I. L49 73 IV9 7. K i.!-!-!e6+3+ A F A }!P!9 7 A F  A }!P7++?/#9 79 7, ?#unused#ioxcolorprefix 7. 049 76 I. L49 73 IV9 7. K i .! -! -!e 6 3 A! A9 77?/#9 79 7,.?#unused#ioio_srcprefix 7+. 049 76 I. L49 73 I49 7. 049 76 I. L49 73 IV9 7. K i.!-!-!e6+3+ A F A }!P!9 7 A F  A }!P7++?/#9 79 7,*?#unused#ioxcolorprefix 7. 049 76 I. L49 73 IV9 7. K i .! -! -!e 6 3 A! A9 77?/#9 79 7,;?#unused#iotaskprefix 7.  I. w63 I.!N R7?/#9 79 7,g?#ctor-self#exception 7_ A K9 7 d d-7?/#9 79 7,i? #self#eo _summarize_exceptionF/opt/julia/packages/ExceptionUnwrapping/kba8L/src/exception_summary.jlprefix#_summarize_exception#5#_summarize_exception#_summarize_exception#7#_summarize_exception#6ExceptionUnwrapping__init__#_unwrap_exception_to_root_unwrap_exception_to_rootH/opt/julia/packages/ExceptionUnwrapping/kba8L/src/ExceptionUnwrapping.jlis_wrapped_exceptionunwrap_exceptionthrow#_unwrap_exception_until_unwrap_exception_untilUnwrappedExceptionNotFoundT @specialize#_has_wrapped_exception_has_wrapped_exception exception ExceptionType RequestedType#unwrap_exception_to_rootunwrap_exception_to_rootinferencebarrier#unwrap_exception_untilunwrap_exception_until#unwrap_exceptionextask#is_wrapped_exception#has_wrapped_exceptionhas_wrapped_exception Iteratorscopyisempty eachindex seekstartIOBuffer##_summarize_exception#7indent showerror _indent_printprocess_backtrace_indent_printlnSTACKTRACE_FIXEDCOLORSStatefulcycleSTACKTRACE_MODULECOLORSprint_stackframe IOContext=>+onlyCompositeException##_summarize_exception#6 exceptions INDENT_LENGTH enumerate SEPARATORTaskFailedException##_summarize_exception#5_summarize_task_exceptions!=current_exceptions##_summarize_task_exceptions#4#_summarize_task_exceptions#4 error_colorcolor#_summarize_task_exceptions==eachline##_indent_print#3#_indent_print#3 printstyled#_indent_print#_indent_print#1normal##_indent_println#2#_indent_println#2#_indent_println^max-length!==getVararg##_indent_print#1printlnTaskIO current_task#summarize_current_exceptionssummarize_current_exceptionsstderr info_colorTITLEVERSION>=@v_str@staticnothing!isequalgetfield:nfieldstypeofTypeisa#do_test_throws_wrappeddo_test_throws_wrappedH/opt/julia/packages/ExceptionUnwrapping/kba8L/src/test_throws_wrapped.jlThrewPass test_throwssourceFailtest_throws_wrongtest_throws_nothingrecord get_testset @nospecializeAnyTupleBase QuoteNodeescExpr#@test_throws_wrapped@test_throws_wrappedinertReturnedblockInterruptException&&if_etryremove_linenums!callrethrowExecutionResultTest ##meta#58typesigmodule linenumberbindingpathUnionStringreadinclude_dependencyjoinpathdirname@__DIR__@doc#includeinclude#evalevalER@@@@0`@@@p`P0P@0P0P@0P0P@000 0 @p`P0`@ 0 0 0 @p`P0` @0@ 0 0 0 @p`P0` @0@ 0 0 @ p 0 @p`P0`@ 0 @p`P0` @0@ P0P @0@ 0 @p`P0P@ P0`@ P0P@ 0 @p`P0P@ 0 @p`P0` @0@ P0P @0@ 0 0 0 0 0 0 0 @p`P0@@0 0 0 0 0 0 0 @p`P0@@0 0 0 @p`P0`@@0 0 0 0 0 0 @p`P0@@@p`P0P@00 0 0 0 0 0 @p`P0p@@@p`P0P@0P0`@0 0 0 @p`P0` @@ @p`P0`@0 0 0 0 0 0 0 0 0 0 0 0 0 @p`P0p@@ 0 0 0 0 0 0 0 0 0 @p`P0`@ P0@0P0P@ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 @p`P0@00 0 0 0 0 0 0 0 0 @p`P0 P @ P@@0 0 0 0 0 0 0 0 0 0 0 0 0 0   P 0 @  P 0 @  P 0 @0@  P 0 @  P 0 @  P 0 @ @ @  P 0 @  P 0 @ @  P 0 @ 0 0 0 0 0 0 0 0 0 @p`PPp0P@ @ PP0P@00 0 @p`P0P@ 0 0 0`@@0`@@0p @@ 0`@@0p @@ 0`@@0P@ @ @ 0P @ @ @ @@@@@0 @000((8  @000  @000  @0008 (((8  @000(((8  @0000 ((8  @00000 0((8  @000((8  @0000  @0000((8  @00   @00   @000((8  @000((8  @0000  @0000((((((((8  @000(((( ((8  @000 ((8  @000((((8  @000((8  @000(((((8  @000((8  @000  @000 ((8  @000 ((8  @000 ((((((( ((8  @000 (  (((8  @000  @000  @000    ((((((( (((8  @000    (((((8  @000000       P8( (@8`8`80 (@8`8`80 P@8`8`800 (@8`8`80 (@8`8`80 8@8`8`8000 (@8`8`80 @8`8`800 (@8`8`80         ((8(  0 @000    @000((8  @000 @000 @000 @000  @000 @000  @000 @00008 @00008@0-/tZ !0"`%% (p(@,,@..P00340779@:?@@FPFJJO0PSSXX[@\^P^bPbeelms`s0uuww@`0p` `P`p0 @0`P@( jܾ BPP)v%B.@n: ; ?@ CCVjuliaincludejulia_include_131.D*0includeDy` /opt/julia/packages/ExceptionUnwrapping/kba8L/srcExceptionUnwrapping.jl  3Linker: LLD 15.0.7 C((08 <J  Y  g 0 v @  P          8 <G( s&h;OP]@#H;HP;`6)=sV )u;(;y .dynsym.gnu.version.gnu.version_r.gnu.hash.hash.dynstr.rela.dyn.rela.plt.rodata.eh_frame.text.plt.data.rel.ro.dynamic.data.got.plt.bss.debug_abbrev.debug_info.debug_str.debug_gnu_pubnames.debug_gnu_pubtypes.debug_line.comment.symtab.shstrtab.strtabtextjulia_include_131jl_globalYY.136jl_globalYY.137jfptr_include_132__gnu_h2f_ieee__extendhfsf2__gnu_f2h_ieee__truncsfhf2__truncdfhf2MUL.CoreDOT._call_latestYY.133MUL.MainDOT.BaseDOT.includeYY.134MUL.ExceptionUnwrappingDOT.ExceptionUnwrappingYY.135metadatajl_dispatch_target_idsjl_image_headersysimgjl_f__call_latestjl_tls_offsetjl_pgcstack_func_slotjulia__gnu_h2f_ieeejulia__gnu_f2h_ieeejulia__truncdfhf2jl_gvar_idxs_0jl_fvar_idxs_0jl_fvar_offsets_0jl_gvar_offsets_0jl_clone_slots_0jl_clone_idxs_0jl_clone_offsets_0jl_pgcstack_key_slotjl_fvar_base_0jl_gvar_base_0jl_RTLD_DEFAULT_handle_pointerjl_RTLD_DEFAULT_handlejl_shard_tablesjl_ptls_tablejl_small_typeofjl_image_pointersjl_system_image_datajl_system_image_size_DYNAMIC  oo %o((,/TTX5=GBXX`QYci`` Pn) {) @; y@ش؄8P,<D0"Ӆ}0Ph"p