|
7 | 7 | Err.ExpandErrorRecord.Verbose.pq - when you want an excessive amount of details |
8 | 8 | */ |
9 | 9 | // when you want extra details on an exception, mainly for interactive use. |
10 | | - Err.ExpandErrorRecord = (exception as any, optional options as nullable record) => [ |
| 10 | + Err.ExpandErrorRecord = ( |
| 11 | + exception as any, |
| 12 | + optional options as nullable record |
| 13 | + ) => [ |
| 14 | + Json = (source as any) as text => Text.FromBinary( Json.FromValue( source ) ), |
11 | 15 | return = [ |
12 | 16 | // Er_Type = Value.Type( exception ), // is alway a record? |
13 | 17 | Err = exception, |
|
21 | 25 | Message.Format = Err[Message.Format]? ?? null, |
22 | 26 | Message.Parameters = Err[Message.Parameters]? ?? null, |
23 | 27 |
|
24 | | - Expression.Stack = Err.Meta[Expression.Stack]? ?? null, |
25 | | - Stack_Json_Oneline = Json( Expression.Stack ), |
26 | | - Stack_Json_List = List.Transform( |
27 | | - Expression.Stack, |
28 | | - (item) => |
29 | | - Json( item ) |
30 | | - ), |
31 | | - Stack_Json_List_Str = Text.Combine( Stack_Json_List, "#(cr,lf)"), |
32 | | - Stack_JsonAbbr_List_Str = Text.Combine( Stack_JsonAbbr_List_Simple, "#(cr,lf)"), |
33 | | - |
34 | | - Stack_JsonAbbr_List_Simple = List.Transform( |
35 | | - Stack_Json_List, |
36 | | - (item) => Json.Abbr( item ) |
37 | | - ), |
| 28 | + Expression.Stack = Err.Meta[Expression.Stack]? ?? null, |
| 29 | + Expression.Stack.Json = Json( Expression.Stack ), |
| 30 | + Expression.Stack.JsonLines = |
| 31 | + Text.Combine( |
| 32 | + List.Transform( |
| 33 | + Expression.Stack, |
| 34 | + (item) => Json( item ) |
| 35 | + ), |
| 36 | + "#(cr,lf)" ), |
38 | 37 |
|
39 | 38 | ActivityId = Diagnostics.ActivityId(), |
40 | 39 | ModuleVersion = Module.Versions() |
|
0 commit comments