enhanced_errors 3.0.2 → 3.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -3
- data/benchmark/benchmark.rb +31 -29
- data/benchmark/memory_bench.rb +1 -1
- data/benchmark/result.txt +13 -0
- data/doc/Enhanced/Colors.html +2 -2
- data/doc/Enhanced/Context.html +283 -0
- data/doc/Enhanced/ExceptionBindingInfos.html +255 -0
- data/doc/Enhanced/ExceptionContext.html +397 -0
- data/doc/Enhanced.html +8 -4
- data/doc/EnhancedErrors.html +385 -269
- data/doc/EnhancedExceptionContext.html +15 -15
- data/doc/Exception.html +5 -5
- data/doc/ExceptionBindingInfos.html +2 -2
- data/doc/Minitest.html +3 -3
- data/doc/_index.html +12 -6
- data/doc/class_list.html +1 -1
- data/doc/file.README.html +9 -4
- data/doc/index.html +9 -4
- data/doc/method_list.html +34 -18
- data/doc/top-level-namespace.html +18 -8
- data/enhanced_errors.gemspec +1 -1
- data/lib/enhanced/context.rb +7 -5
- data/lib/enhanced/exception.rb +35 -36
- data/lib/enhanced/exception_context.rb +49 -0
- data/lib/enhanced/minitest_patch.rb +1 -1
- data/lib/enhanced_errors.rb +170 -122
- metadata +8 -9
- data/.yardoc/checksums +0 -6
- data/.yardoc/complete +0 -0
- data/.yardoc/object_types +0 -0
- data/.yardoc/objects/root.dat +0 -0
- data/.yardoc/proxy_types +0 -0
- data/lib/enhanced/enhanced_exception_context.rb +0 -47
@@ -4,7 +4,7 @@
|
|
4
4
|
<meta charset="utf-8">
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
6
|
<title>
|
7
|
-
Module:
|
7
|
+
Module: Enhanced::ExceptionContext
|
8
8
|
|
9
9
|
— Documentation by YARD 0.9.37
|
10
10
|
|
@@ -15,7 +15,7 @@
|
|
15
15
|
<link rel="stylesheet" href="css/common.css" type="text/css" />
|
16
16
|
|
17
17
|
<script type="text/javascript">
|
18
|
-
pathId = "
|
18
|
+
pathId = "Enhanced::ExceptionContext";
|
19
19
|
relpath = '';
|
20
20
|
</script>
|
21
21
|
|
@@ -39,7 +39,7 @@
|
|
39
39
|
<a href="_index.html">Index (E)</a> »
|
40
40
|
|
41
41
|
|
42
|
-
<span class="title">
|
42
|
+
<span class="title">Enhanced::ExceptionContext</span>
|
43
43
|
|
44
44
|
</div>
|
45
45
|
|
@@ -59,7 +59,7 @@
|
|
59
59
|
<div class="clear"></div>
|
60
60
|
</div>
|
61
61
|
|
62
|
-
<div id="content"><h1>Module:
|
62
|
+
<div id="content"><h1>Module: Enhanced::ExceptionContext
|
63
63
|
|
64
64
|
|
65
65
|
|
@@ -71,7 +71,7 @@
|
|
71
71
|
|
72
72
|
<dl>
|
73
73
|
<dt>Extended by:</dt>
|
74
|
-
<dd><span class='object_link'><a href="" title="
|
74
|
+
<dd><span class='object_link'><a href="" title="Enhanced::ExceptionContext (module)">Enhanced::ExceptionContext</a></span></dd>
|
75
75
|
</dl>
|
76
76
|
|
77
77
|
|
@@ -81,7 +81,7 @@
|
|
81
81
|
|
82
82
|
<dl>
|
83
83
|
<dt>Included in:</dt>
|
84
|
-
<dd><span class='object_link'><a href="" title="
|
84
|
+
<dd><span class='object_link'><a href="" title="Enhanced::ExceptionContext (module)">Enhanced::ExceptionContext</a></span></dd>
|
85
85
|
</dl>
|
86
86
|
|
87
87
|
|
@@ -251,8 +251,8 @@
|
|
251
251
|
<pre class="code"><span class="info file"># File 'lib/enhanced/enhanced_exception_context.rb', line 42</span>
|
252
252
|
|
253
253
|
<span class='kw'>def</span> <span class='id identifier rubyid_clear_all'>clear_all</span>
|
254
|
-
<span class='const'><span class='object_link'><a href="#MUTEX-constant" title="
|
255
|
-
<span class='const'><span class='object_link'><a href="#REGISTRY-constant" title="
|
254
|
+
<span class='const'><span class='object_link'><a href="#MUTEX-constant" title="Enhanced::ExceptionContext::MUTEX (constant)">MUTEX</a></span></span><span class='period'>.</span><span class='id identifier rubyid_synchronize'>synchronize</span> <span class='kw'>do</span>
|
255
|
+
<span class='const'><span class='object_link'><a href="#REGISTRY-constant" title="Enhanced::ExceptionContext::REGISTRY (constant)">REGISTRY</a></span></span><span class='period'>.</span><span class='id identifier rubyid_clear'>clear</span>
|
256
256
|
<span class='kw'>end</span>
|
257
257
|
<span class='kw'>end</span></pre>
|
258
258
|
</td>
|
@@ -285,8 +285,8 @@
|
|
285
285
|
<pre class="code"><span class="info file"># File 'lib/enhanced/enhanced_exception_context.rb', line 36</span>
|
286
286
|
|
287
287
|
<span class='kw'>def</span> <span class='id identifier rubyid_clear_context'>clear_context</span><span class='lparen'>(</span><span class='id identifier rubyid_exception'>exception</span><span class='rparen'>)</span>
|
288
|
-
<span class='const'><span class='object_link'><a href="#MUTEX-constant" title="
|
289
|
-
<span class='const'><span class='object_link'><a href="#REGISTRY-constant" title="
|
288
|
+
<span class='const'><span class='object_link'><a href="#MUTEX-constant" title="Enhanced::ExceptionContext::MUTEX (constant)">MUTEX</a></span></span><span class='period'>.</span><span class='id identifier rubyid_synchronize'>synchronize</span> <span class='kw'>do</span>
|
289
|
+
<span class='const'><span class='object_link'><a href="#REGISTRY-constant" title="Enhanced::ExceptionContext::REGISTRY (constant)">REGISTRY</a></span></span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span><span class='lparen'>(</span><span class='id identifier rubyid_exception'>exception</span><span class='period'>.</span><span class='id identifier rubyid_object_id'>object_id</span><span class='rparen'>)</span>
|
290
290
|
<span class='kw'>end</span>
|
291
291
|
<span class='kw'>end</span></pre>
|
292
292
|
</td>
|
@@ -329,8 +329,8 @@
|
|
329
329
|
<pre class="code"><span class="info file"># File 'lib/enhanced/enhanced_exception_context.rb', line 20</span>
|
330
330
|
|
331
331
|
<span class='kw'>def</span> <span class='id identifier rubyid_context_for'>context_for</span><span class='lparen'>(</span><span class='id identifier rubyid_exception'>exception</span><span class='rparen'>)</span>
|
332
|
-
<span class='const'><span class='object_link'><a href="#MUTEX-constant" title="
|
333
|
-
<span class='id identifier rubyid_entry'>entry</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="#REGISTRY-constant" title="
|
332
|
+
<span class='const'><span class='object_link'><a href="#MUTEX-constant" title="Enhanced::ExceptionContext::MUTEX (constant)">MUTEX</a></span></span><span class='period'>.</span><span class='id identifier rubyid_synchronize'>synchronize</span> <span class='kw'>do</span>
|
333
|
+
<span class='id identifier rubyid_entry'>entry</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="#REGISTRY-constant" title="Enhanced::ExceptionContext::REGISTRY (constant)">REGISTRY</a></span></span><span class='lbracket'>[</span><span class='id identifier rubyid_exception'>exception</span><span class='period'>.</span><span class='id identifier rubyid_object_id'>object_id</span><span class='rbracket'>]</span>
|
334
334
|
<span class='kw'>return</span> <span class='kw'>nil</span> <span class='kw'>unless</span> <span class='id identifier rubyid_entry'>entry</span>
|
335
335
|
|
336
336
|
<span class='kw'>begin</span>
|
@@ -338,7 +338,7 @@
|
|
338
338
|
</span> <span class='id identifier rubyid_entry'>entry</span><span class='lbracket'>[</span><span class='symbol'>:context</span><span class='rbracket'>]</span>
|
339
339
|
<span class='kw'>rescue</span> <span class='const'>RefError</span>
|
340
340
|
<span class='comment'># Exception no longer alive, clean up
|
341
|
-
</span> <span class='const'><span class='object_link'><a href="#REGISTRY-constant" title="
|
341
|
+
</span> <span class='const'><span class='object_link'><a href="#REGISTRY-constant" title="Enhanced::ExceptionContext::REGISTRY (constant)">REGISTRY</a></span></span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span><span class='lparen'>(</span><span class='id identifier rubyid_exception'>exception</span><span class='period'>.</span><span class='id identifier rubyid_object_id'>object_id</span><span class='rparen'>)</span>
|
342
342
|
<span class='kw'>nil</span>
|
343
343
|
<span class='kw'>end</span>
|
344
344
|
<span class='kw'>end</span>
|
@@ -373,8 +373,8 @@
|
|
373
373
|
<pre class="code"><span class="info file"># File 'lib/enhanced/enhanced_exception_context.rb', line 14</span>
|
374
374
|
|
375
375
|
<span class='kw'>def</span> <span class='id identifier rubyid_store_context'>store_context</span><span class='lparen'>(</span><span class='id identifier rubyid_exception'>exception</span><span class='comma'>,</span> <span class='id identifier rubyid_context'>context</span><span class='rparen'>)</span>
|
376
|
-
<span class='const'><span class='object_link'><a href="#MUTEX-constant" title="
|
377
|
-
<span class='const'><span class='object_link'><a href="#REGISTRY-constant" title="
|
376
|
+
<span class='const'><span class='object_link'><a href="#MUTEX-constant" title="Enhanced::ExceptionContext::MUTEX (constant)">MUTEX</a></span></span><span class='period'>.</span><span class='id identifier rubyid_synchronize'>synchronize</span> <span class='kw'>do</span>
|
377
|
+
<span class='const'><span class='object_link'><a href="#REGISTRY-constant" title="Enhanced::ExceptionContext::REGISTRY (constant)">REGISTRY</a></span></span><span class='lbracket'>[</span><span class='id identifier rubyid_exception'>exception</span><span class='period'>.</span><span class='id identifier rubyid_object_id'>object_id</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='lbrace'>{</span> <span class='label'>weak_exc:</span> <span class='const'>WeakRef</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_exception'>exception</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='label'>context:</span> <span class='id identifier rubyid_context'>context</span> <span class='rbrace'>}</span>
|
378
378
|
<span class='kw'>end</span>
|
379
379
|
<span class='kw'>end</span></pre>
|
380
380
|
</td>
|
data/doc/Exception.html
CHANGED
@@ -73,7 +73,7 @@
|
|
73
73
|
|
74
74
|
<dl>
|
75
75
|
<dt>Includes:</dt>
|
76
|
-
<dd><span class='object_link'><a href="ExceptionBindingInfos.html" title="ExceptionBindingInfos (module)">ExceptionBindingInfos</a></span></dd>
|
76
|
+
<dd><span class='object_link'><a href="Enhanced/ExceptionBindingInfos.html" title="Enhanced::ExceptionBindingInfos (module)">Enhanced::ExceptionBindingInfos</a></span></dd>
|
77
77
|
</dl>
|
78
78
|
|
79
79
|
|
@@ -104,16 +104,16 @@
|
|
104
104
|
|
105
105
|
<h2>Method Summary</h2>
|
106
106
|
|
107
|
-
<h3 class="inherited">Methods included from <span class='object_link'><a href="ExceptionBindingInfos.html" title="ExceptionBindingInfos (module)">ExceptionBindingInfos</a></span></h3>
|
108
|
-
<p class="inherited"><span class='object_link'><a href="ExceptionBindingInfos.html#binding_infos-instance_method" title="ExceptionBindingInfos#binding_infos (method)">#binding_infos</a></span>, <span class='object_link'><a href="ExceptionBindingInfos.html#captured_variables-instance_method" title="ExceptionBindingInfos#captured_variables (method)">#captured_variables</a></span></p>
|
107
|
+
<h3 class="inherited">Methods included from <span class='object_link'><a href="Enhanced/ExceptionBindingInfos.html" title="Enhanced::ExceptionBindingInfos (module)">Enhanced::ExceptionBindingInfos</a></span></h3>
|
108
|
+
<p class="inherited"><span class='object_link'><a href="Enhanced/ExceptionBindingInfos.html#binding_infos-instance_method" title="Enhanced::ExceptionBindingInfos#binding_infos (method)">#binding_infos</a></span>, <span class='object_link'><a href="Enhanced/ExceptionBindingInfos.html#captured_variables-instance_method" title="Enhanced::ExceptionBindingInfos#captured_variables (method)">#captured_variables</a></span></p>
|
109
109
|
|
110
110
|
|
111
111
|
</div>
|
112
112
|
|
113
113
|
<div id="footer">
|
114
|
-
Generated on Tue Dec
|
114
|
+
Generated on Tue Dec 24 15:27:20 2024 by
|
115
115
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
116
|
-
0.9.37 (ruby-3.3
|
116
|
+
0.9.37 (ruby-3.1.3).
|
117
117
|
</div>
|
118
118
|
|
119
119
|
</div>
|
@@ -184,10 +184,10 @@
|
|
184
184
|
<pre class="code"><span class="info file"># File 'lib/enhanced/exception.rb', line 5</span>
|
185
185
|
|
186
186
|
<span class='kw'>def</span> <span class='id identifier rubyid_binding_infos'>binding_infos</span>
|
187
|
-
<span class='id identifier rubyid_ctx'>ctx</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="
|
187
|
+
<span class='id identifier rubyid_ctx'>ctx</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="Enhanced::ExceptionContext.html" title="Enhanced::ExceptionContext (module)">Enhanced::ExceptionContext</a></span></span><span class='period'>.</span><span class='id identifier rubyid_context_for'><span class='object_link'><a href="Enhanced::ExceptionContext.html#context_for-instance_method" title="Enhanced::ExceptionContext#context_for (method)">context_for</a></span></span><span class='lparen'>(</span><span class='kw'>self</span><span class='rparen'>)</span>
|
188
188
|
<span class='kw'>unless</span> <span class='id identifier rubyid_ctx'>ctx</span>
|
189
189
|
<span class='id identifier rubyid_ctx'>ctx</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="Context.html" title="Context (class)">Context</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Context.html#initialize-instance_method" title="Context#initialize (method)">new</a></span></span>
|
190
|
-
<span class='const'><span class='object_link'><a href="
|
190
|
+
<span class='const'><span class='object_link'><a href="Enhanced::ExceptionContext.html" title="Enhanced::ExceptionContext (module)">Enhanced::ExceptionContext</a></span></span><span class='period'>.</span><span class='id identifier rubyid_store_context'><span class='object_link'><a href="Enhanced::ExceptionContext.html#store_context-instance_method" title="Enhanced::ExceptionContext#store_context (method)">store_context</a></span></span><span class='lparen'>(</span><span class='kw'>self</span><span class='comma'>,</span> <span class='id identifier rubyid_ctx'>ctx</span><span class='rparen'>)</span>
|
191
191
|
<span class='kw'>end</span>
|
192
192
|
<span class='id identifier rubyid_ctx'>ctx</span><span class='period'>.</span><span class='id identifier rubyid_binding_infos'>binding_infos</span>
|
193
193
|
<span class='kw'>end</span></pre>
|
data/doc/Minitest.html
CHANGED
@@ -215,7 +215,7 @@
|
|
215
215
|
<span class='kw'>begin</span>
|
216
216
|
<span class='id identifier rubyid_binding_infos'>binding_infos</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="EnhancedErrors.html" title="EnhancedErrors (class)">EnhancedErrors</a></span></span><span class='period'>.</span><span class='id identifier rubyid_stop_minitest_binding_capture'><span class='object_link'><a href="EnhancedErrors.html#stop_minitest_binding_capture-class_method" title="EnhancedErrors.stop_minitest_binding_capture (method)">stop_minitest_binding_capture</a></span></span>
|
217
217
|
<span class='const'><span class='object_link'><a href="EnhancedErrors.html" title="EnhancedErrors (class)">EnhancedErrors</a></span></span><span class='period'>.</span><span class='id identifier rubyid_override_exception_message'><span class='object_link'><a href="EnhancedErrors.html#override_exception_message-class_method" title="EnhancedErrors.override_exception_message (method)">override_exception_message</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_result'>result</span><span class='period'>.</span><span class='id identifier rubyid_failures'>failures</span><span class='period'>.</span><span class='id identifier rubyid_last'>last</span><span class='comma'>,</span> <span class='id identifier rubyid_binding_infos'>binding_infos</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_result'>result</span><span class='period'>.</span><span class='id identifier rubyid_failures'>failures</span><span class='period'>.</span><span class='id identifier rubyid_any?'>any?</span>
|
218
|
-
<span class='const'><span class='object_link'><a href="
|
218
|
+
<span class='const'><span class='object_link'><a href="Enhanced.html" title="Enhanced (module)">Enhanced</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Enhanced/ExceptionContext.html" title="Enhanced::ExceptionContext (module)">ExceptionContext</a></span></span><span class='period'>.</span><span class='id identifier rubyid_clear_all'><span class='object_link'><a href="Enhanced/ExceptionContext.html#clear_all-instance_method" title="Enhanced::ExceptionContext#clear_all (method)">clear_all</a></span></span>
|
219
219
|
<span class='kw'>rescue</span> <span class='op'>=></span> <span class='id identifier rubyid_e'>e</span>
|
220
220
|
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Ignored error during error enhancement: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_e'>e</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span>
|
221
221
|
<span class='kw'>end</span>
|
@@ -230,9 +230,9 @@
|
|
230
230
|
</div>
|
231
231
|
|
232
232
|
<div id="footer">
|
233
|
-
Generated on Tue Dec
|
233
|
+
Generated on Tue Dec 24 15:27:20 2024 by
|
234
234
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
235
|
-
0.9.37 (ruby-3.3
|
235
|
+
0.9.37 (ruby-3.1.3).
|
236
236
|
</div>
|
237
237
|
|
238
238
|
</div>
|
data/doc/_index.html
CHANGED
@@ -88,7 +88,9 @@
|
|
88
88
|
</li>
|
89
89
|
|
90
90
|
<li>
|
91
|
-
<span class='object_link'><a href="Context.html" title="Context (class)">Context</a></span>
|
91
|
+
<span class='object_link'><a href="Enhanced/Context.html" title="Enhanced::Context (class)">Context</a></span>
|
92
|
+
|
93
|
+
<small>(Enhanced)</small>
|
92
94
|
|
93
95
|
</li>
|
94
96
|
|
@@ -111,17 +113,21 @@
|
|
111
113
|
</li>
|
112
114
|
|
113
115
|
<li>
|
114
|
-
<span class='object_link'><a href="
|
116
|
+
<span class='object_link'><a href="Exception.html" title="Exception (class)">Exception</a></span>
|
115
117
|
|
116
118
|
</li>
|
117
119
|
|
118
120
|
<li>
|
119
|
-
<span class='object_link'><a href="
|
121
|
+
<span class='object_link'><a href="Enhanced/ExceptionBindingInfos.html" title="Enhanced::ExceptionBindingInfos (module)">ExceptionBindingInfos</a></span>
|
122
|
+
|
123
|
+
<small>(Enhanced)</small>
|
120
124
|
|
121
125
|
</li>
|
122
126
|
|
123
127
|
<li>
|
124
|
-
<span class='object_link'><a href="
|
128
|
+
<span class='object_link'><a href="Enhanced/ExceptionContext.html" title="Enhanced::ExceptionContext (module)">ExceptionContext</a></span>
|
129
|
+
|
130
|
+
<small>(Enhanced)</small>
|
125
131
|
|
126
132
|
</li>
|
127
133
|
|
@@ -150,9 +156,9 @@
|
|
150
156
|
</div>
|
151
157
|
|
152
158
|
<div id="footer">
|
153
|
-
Generated on Tue Dec
|
159
|
+
Generated on Tue Dec 24 15:27:20 2024 by
|
154
160
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
155
|
-
0.9.37 (ruby-3.3
|
161
|
+
0.9.37 (ruby-3.1.3).
|
156
162
|
</div>
|
157
163
|
|
158
164
|
</div>
|
data/doc/class_list.html
CHANGED
@@ -46,7 +46,7 @@
|
|
46
46
|
|
47
47
|
<ul id="full_list" class="class">
|
48
48
|
<li id="object_" class="odd"><div class="item" style="padding-left:30px"><span class='object_link'><a href="top-level-namespace.html" title="Top Level Namespace (root)">Top Level Namespace</a></span></div></li>
|
49
|
-
<li id='
|
49
|
+
<li id='object_Enhanced' class='even'><div class='item' style='padding-left:30px'><a tabindex='0' class='toggle' role='button' aria-label='Enhanced child nodes' aria-expanded='false' aria-controls='object_Enhanced'></a> <span class='object_link'><a href="Enhanced.html" title="Enhanced (module)">Enhanced</a></span><small class='search_info'>Top Level Namespace</small></div><div aria-labelledby='object_Enhanced'><ul><li id='object_Enhanced::Colors' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="Enhanced/Colors.html" title="Enhanced::Colors (class)">Colors</a></span> < Object<small class='search_info'>Enhanced</small></div></li><li id='object_Enhanced::Context' class='collapsed even'><div class='item' style='padding-left:45px'><span class='object_link'><a href="Enhanced/Context.html" title="Enhanced::Context (class)">Context</a></span> < Object<small class='search_info'>Enhanced</small></div></li><li id='object_Enhanced::ExceptionBindingInfos' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="Enhanced/ExceptionBindingInfos.html" title="Enhanced::ExceptionBindingInfos (module)">ExceptionBindingInfos</a></span><small class='search_info'>Enhanced</small></div></li><li id='object_Enhanced::ExceptionContext' class='collapsed even'><div class='item' style='padding-left:45px'><span class='object_link'><a href="Enhanced/ExceptionContext.html" title="Enhanced::ExceptionContext (module)">ExceptionContext</a></span><small class='search_info'>Enhanced</small></div></li></ul></div></li><li id='object_EnhancedErrors' class='odd'><div class='item' style='padding-left:30px'><span class='object_link'><a href="EnhancedErrors.html" title="EnhancedErrors (class)">EnhancedErrors</a></span> < Object<small class='search_info'>Top Level Namespace</small></div></li><li id='object_Exception' class='even'><div class='item' style='padding-left:30px'><span class='object_link'><a href="Exception.html" title="Exception (class)">Exception</a></span><small class='search_info'>Top Level Namespace</small></div></li><li id='object_Minitest' class='odd'><div class='item' style='padding-left:30px'><span class='object_link'><a href="Minitest.html" title="Minitest (module)">Minitest</a></span><small class='search_info'>Top Level Namespace</small></div></li>
|
50
50
|
|
51
51
|
</ul>
|
52
52
|
</div>
|
data/doc/file.README.html
CHANGED
@@ -201,6 +201,8 @@
|
|
201
201
|
<p>Address elusive “Heisenbugs” by capturing error context preemptively.</p>
|
202
202
|
</li><li>
|
203
203
|
<p>Debug cron jobs and daemons with rich, failure-specific logs.</p>
|
204
|
+
</li><li>
|
205
|
+
<p>LLM-food - Feed debug info with variables into an LLM, making state examine-able for it</p>
|
204
206
|
</li></ul>
|
205
207
|
|
206
208
|
<h2 id="label-Installation">Installation</h2>
|
@@ -384,7 +386,7 @@
|
|
384
386
|
<ul><li>
|
385
387
|
<p><strong>Info Level</strong>: Respects the skip list, excluding predefined sensitive or irrelevant variables. Global variables are ignored.</p>
|
386
388
|
</li><li>
|
387
|
-
<p><strong>Debug Level</strong>: Ignores the skip lists, capturing all variables including those typically excluded and global variables.
|
389
|
+
<p><strong>Debug Level</strong>: Ignores the skip lists, capturing all variables including those typically excluded and global variables. Global variables are only captured in debug mode, and they exclude the default Ruby global variables.</p>
|
388
390
|
</li></ul>
|
389
391
|
|
390
392
|
<p><strong>Default Behavior</strong>: By default, <code>info</code> level is used, which excludes variables in the skip list to protect sensitive information. In <code>debug</code> mode, the skip lists are ignored to provide more comprehensive data, which is useful during development but should be used cautiously to avoid exposing sensitive data. The info mode is recommended.</p>
|
@@ -478,7 +480,10 @@
|
|
478
480
|
|
479
481
|
<h2 id="label-Contributing">Contributing</h2>
|
480
482
|
|
481
|
-
<p>Bug reports and pull requests are welcome on GitHub
|
483
|
+
<p>Bug reports and pull requests are welcome on GitHub.</p>
|
484
|
+
<ul><li>
|
485
|
+
<p>Please include tests to demonstrate your contribution working.</p>
|
486
|
+
</li></ul>
|
482
487
|
|
483
488
|
<h2 id="label-License">License</h2>
|
484
489
|
|
@@ -486,9 +491,9 @@
|
|
486
491
|
</div></div>
|
487
492
|
|
488
493
|
<div id="footer">
|
489
|
-
Generated on Tue Dec
|
494
|
+
Generated on Tue Dec 24 15:27:20 2024 by
|
490
495
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
491
|
-
0.9.37 (ruby-3.3
|
496
|
+
0.9.37 (ruby-3.1.3).
|
492
497
|
</div>
|
493
498
|
|
494
499
|
</div>
|
data/doc/index.html
CHANGED
@@ -201,6 +201,8 @@
|
|
201
201
|
<p>Address elusive “Heisenbugs” by capturing error context preemptively.</p>
|
202
202
|
</li><li>
|
203
203
|
<p>Debug cron jobs and daemons with rich, failure-specific logs.</p>
|
204
|
+
</li><li>
|
205
|
+
<p>LLM-food - Feed debug info with variables into an LLM, making state examine-able for it</p>
|
204
206
|
</li></ul>
|
205
207
|
|
206
208
|
<h2 id="label-Installation">Installation</h2>
|
@@ -384,7 +386,7 @@
|
|
384
386
|
<ul><li>
|
385
387
|
<p><strong>Info Level</strong>: Respects the skip list, excluding predefined sensitive or irrelevant variables. Global variables are ignored.</p>
|
386
388
|
</li><li>
|
387
|
-
<p><strong>Debug Level</strong>: Ignores the skip lists, capturing all variables including those typically excluded and global variables.
|
389
|
+
<p><strong>Debug Level</strong>: Ignores the skip lists, capturing all variables including those typically excluded and global variables. Global variables are only captured in debug mode, and they exclude the default Ruby global variables.</p>
|
388
390
|
</li></ul>
|
389
391
|
|
390
392
|
<p><strong>Default Behavior</strong>: By default, <code>info</code> level is used, which excludes variables in the skip list to protect sensitive information. In <code>debug</code> mode, the skip lists are ignored to provide more comprehensive data, which is useful during development but should be used cautiously to avoid exposing sensitive data. The info mode is recommended.</p>
|
@@ -478,7 +480,10 @@
|
|
478
480
|
|
479
481
|
<h2 id="label-Contributing">Contributing</h2>
|
480
482
|
|
481
|
-
<p>Bug reports and pull requests are welcome on GitHub
|
483
|
+
<p>Bug reports and pull requests are welcome on GitHub.</p>
|
484
|
+
<ul><li>
|
485
|
+
<p>Please include tests to demonstrate your contribution working.</p>
|
486
|
+
</li></ul>
|
482
487
|
|
483
488
|
<h2 id="label-License">License</h2>
|
484
489
|
|
@@ -486,9 +491,9 @@
|
|
486
491
|
</div></div>
|
487
492
|
|
488
493
|
<div id="footer">
|
489
|
-
Generated on Tue Dec
|
494
|
+
Generated on Tue Dec 24 15:27:20 2024 by
|
490
495
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
491
|
-
0.9.37 (ruby-3.3
|
496
|
+
0.9.37 (ruby-3.1.3).
|
492
497
|
</div>
|
493
498
|
|
494
499
|
</div>
|
data/doc/method_list.html
CHANGED
@@ -73,16 +73,16 @@
|
|
73
73
|
|
74
74
|
<li class="even ">
|
75
75
|
<div class="item">
|
76
|
-
<span class='object_link'><a href="Context.html#binding_infos-instance_method" title="Context#binding_infos (method)">#binding_infos</a></span>
|
77
|
-
<small>Context</small>
|
76
|
+
<span class='object_link'><a href="Enhanced/Context.html#binding_infos-instance_method" title="Enhanced::Context#binding_infos (method)">#binding_infos</a></span>
|
77
|
+
<small>Enhanced::Context</small>
|
78
78
|
</div>
|
79
79
|
</li>
|
80
80
|
|
81
81
|
|
82
82
|
<li class="odd ">
|
83
83
|
<div class="item">
|
84
|
-
<span class='object_link'><a href="ExceptionBindingInfos.html#binding_infos-instance_method" title="ExceptionBindingInfos#binding_infos (method)">#binding_infos</a></span>
|
85
|
-
<small>ExceptionBindingInfos</small>
|
84
|
+
<span class='object_link'><a href="Enhanced/ExceptionBindingInfos.html#binding_infos-instance_method" title="Enhanced::ExceptionBindingInfos#binding_infos (method)">#binding_infos</a></span>
|
85
|
+
<small>Enhanced::ExceptionBindingInfos</small>
|
86
86
|
</div>
|
87
87
|
</li>
|
88
88
|
|
@@ -113,8 +113,8 @@
|
|
113
113
|
|
114
114
|
<li class="odd ">
|
115
115
|
<div class="item">
|
116
|
-
<span class='object_link'><a href="ExceptionBindingInfos.html#captured_variables-instance_method" title="ExceptionBindingInfos#captured_variables (method)">#captured_variables</a></span>
|
117
|
-
<small>ExceptionBindingInfos</small>
|
116
|
+
<span class='object_link'><a href="Enhanced/ExceptionBindingInfos.html#captured_variables-instance_method" title="Enhanced::ExceptionBindingInfos#captured_variables (method)">#captured_variables</a></span>
|
117
|
+
<small>Enhanced::ExceptionBindingInfos</small>
|
118
118
|
</div>
|
119
119
|
</li>
|
120
120
|
|
@@ -129,16 +129,16 @@
|
|
129
129
|
|
130
130
|
<li class="odd ">
|
131
131
|
<div class="item">
|
132
|
-
<span class='object_link'><a href="
|
133
|
-
<small>
|
132
|
+
<span class='object_link'><a href="Enhanced/ExceptionContext.html#clear_all-instance_method" title="Enhanced::ExceptionContext#clear_all (method)">#clear_all</a></span>
|
133
|
+
<small>Enhanced::ExceptionContext</small>
|
134
134
|
</div>
|
135
135
|
</li>
|
136
136
|
|
137
137
|
|
138
138
|
<li class="even ">
|
139
139
|
<div class="item">
|
140
|
-
<span class='object_link'><a href="
|
141
|
-
<small>
|
140
|
+
<span class='object_link'><a href="Enhanced/ExceptionContext.html#clear_context-instance_method" title="Enhanced::ExceptionContext#clear_context (method)">#clear_context</a></span>
|
141
|
+
<small>Enhanced::ExceptionContext</small>
|
142
142
|
</div>
|
143
143
|
</li>
|
144
144
|
|
@@ -169,8 +169,8 @@
|
|
169
169
|
|
170
170
|
<li class="even ">
|
171
171
|
<div class="item">
|
172
|
-
<span class='object_link'><a href="
|
173
|
-
<small>
|
172
|
+
<span class='object_link'><a href="Enhanced/ExceptionContext.html#context_for-instance_method" title="Enhanced::ExceptionContext#context_for (method)">#context_for</a></span>
|
173
|
+
<small>Enhanced::ExceptionContext</small>
|
174
174
|
</div>
|
175
175
|
</li>
|
176
176
|
|
@@ -257,8 +257,8 @@
|
|
257
257
|
|
258
258
|
<li class="odd ">
|
259
259
|
<div class="item">
|
260
|
-
<span class='object_link'><a href="Context.html#initialize-instance_method" title="Context#initialize (method)">#initialize</a></span>
|
261
|
-
<small>Context</small>
|
260
|
+
<span class='object_link'><a href="Enhanced/Context.html#initialize-instance_method" title="Enhanced::Context#initialize (method)">#initialize</a></span>
|
261
|
+
<small>Enhanced::Context</small>
|
262
262
|
</div>
|
263
263
|
</li>
|
264
264
|
|
@@ -401,7 +401,7 @@
|
|
401
401
|
|
402
402
|
<li class="odd ">
|
403
403
|
<div class="item">
|
404
|
-
<span class='object_link'><a href="EnhancedErrors.html#
|
404
|
+
<span class='object_link'><a href="EnhancedErrors.html#safe_to_inspect%3F-class_method" title="EnhancedErrors.safe_to_inspect? (method)">safe_to_inspect?</a></span>
|
405
405
|
<small>EnhancedErrors</small>
|
406
406
|
</div>
|
407
407
|
</li>
|
@@ -409,13 +409,21 @@
|
|
409
409
|
|
410
410
|
<li class="even ">
|
411
411
|
<div class="item">
|
412
|
-
<span class='object_link'><a href="EnhancedErrors.html#
|
412
|
+
<span class='object_link'><a href="EnhancedErrors.html#skip_list-class_method" title="EnhancedErrors.skip_list (method)">skip_list</a></span>
|
413
413
|
<small>EnhancedErrors</small>
|
414
414
|
</div>
|
415
415
|
</li>
|
416
416
|
|
417
417
|
|
418
418
|
<li class="odd ">
|
419
|
+
<div class="item">
|
420
|
+
<span class='object_link'><a href="EnhancedErrors.html#start_minitest_binding_capture-class_method" title="EnhancedErrors.start_minitest_binding_capture (method)">start_minitest_binding_capture</a></span>
|
421
|
+
<small>EnhancedErrors</small>
|
422
|
+
</div>
|
423
|
+
</li>
|
424
|
+
|
425
|
+
|
426
|
+
<li class="even ">
|
419
427
|
<div class="item">
|
420
428
|
<span class='object_link'><a href="EnhancedErrors.html#start_rspec_binding_capture-class_method" title="EnhancedErrors.start_rspec_binding_capture (method)">start_rspec_binding_capture</a></span>
|
421
429
|
<small>EnhancedErrors</small>
|
@@ -423,6 +431,14 @@
|
|
423
431
|
</li>
|
424
432
|
|
425
433
|
|
434
|
+
<li class="odd ">
|
435
|
+
<div class="item">
|
436
|
+
<span class='object_link'><a href="EnhancedErrors.html#start_rspec_binding_trap-class_method" title="EnhancedErrors.start_rspec_binding_trap (method)">start_rspec_binding_trap</a></span>
|
437
|
+
<small>EnhancedErrors</small>
|
438
|
+
</div>
|
439
|
+
</li>
|
440
|
+
|
441
|
+
|
426
442
|
<li class="even ">
|
427
443
|
<div class="item">
|
428
444
|
<span class='object_link'><a href="EnhancedErrors.html#stop_minitest_binding_capture-class_method" title="EnhancedErrors.stop_minitest_binding_capture (method)">stop_minitest_binding_capture</a></span>
|
@@ -441,8 +457,8 @@
|
|
441
457
|
|
442
458
|
<li class="even ">
|
443
459
|
<div class="item">
|
444
|
-
<span class='object_link'><a href="
|
445
|
-
<small>
|
460
|
+
<span class='object_link'><a href="Enhanced/ExceptionContext.html#store_context-instance_method" title="Enhanced::ExceptionContext#store_context (method)">#store_context</a></span>
|
461
|
+
<small>Enhanced::ExceptionContext</small>
|
446
462
|
</div>
|
447
463
|
</li>
|
448
464
|
|
@@ -82,11 +82,11 @@
|
|
82
82
|
<p class="children">
|
83
83
|
|
84
84
|
|
85
|
-
<strong class="modules">Modules:</strong> <span class='object_link'><a href="Enhanced.html" title="Enhanced (module)">Enhanced</a></span>, <span class='object_link'><a href="
|
85
|
+
<strong class="modules">Modules:</strong> <span class='object_link'><a href="Enhanced.html" title="Enhanced (module)">Enhanced</a></span>, <span class='object_link'><a href="Minitest.html" title="Minitest (module)">Minitest</a></span>
|
86
86
|
|
87
87
|
|
88
88
|
|
89
|
-
<strong class="classes">Classes:</strong> <span class='object_link'><a href="
|
89
|
+
<strong class="classes">Classes:</strong> <span class='object_link'><a href="EnhancedErrors.html" title="EnhancedErrors (class)">EnhancedErrors</a></span>, <span class='object_link'><a href="Exception.html" title="Exception (class)">Exception</a></span>
|
90
90
|
|
91
91
|
|
92
92
|
</p>
|
@@ -100,11 +100,21 @@
|
|
100
100
|
<dl class="constants">
|
101
101
|
|
102
102
|
<dt id="IGNORED_EXCEPTIONS-constant" class="">IGNORED_EXCEPTIONS =
|
103
|
-
|
103
|
+
<div class="docstring">
|
104
|
+
<div class="discussion">
|
105
|
+
|
106
|
+
<p>Exceptions we could handle but overlook for other reasons. These class constants are not always loaded and generally are only be available when ‘required`, so we detect them by strings.</p>
|
107
|
+
|
108
|
+
|
109
|
+
</div>
|
110
|
+
</div>
|
111
|
+
<div class="tags">
|
112
|
+
|
113
|
+
|
114
|
+
</div>
|
104
115
|
</dt>
|
105
|
-
<dd><pre class="code"><span class='qwords_beg'>%w[</span><span class='tstring_content'>
|
106
|
-
</span><span class='tstring_content'>
|
107
|
-
</span><span class='tstring_content'>RSpec::Matchers::BuiltIn::RaiseError</span><span class='words_sep'> </span><span class='tstring_content'>SystemStackError</span><span class='words_sep'> </span><span class='tstring_content'>Psych::BadAlias</span><span class='tstring_end'>]</span></span></pre></dd>
|
116
|
+
<dd><pre class="code"><span class='qwords_beg'>%w[</span><span class='tstring_content'>RSpec::Expectations::ExpectationNotMetError</span><span class='words_sep'> </span><span class='tstring_content'>RSpec::Matchers::BuiltIn::RaiseError</span><span class='words_sep'>
|
117
|
+
</span><span class='tstring_content'>JSON::ParserError</span><span class='words_sep'> </span><span class='tstring_content'>Zlib::Error</span><span class='words_sep'> </span><span class='tstring_content'>OpenSSL::SSL::SSLError</span><span class='words_sep'> </span><span class='tstring_content'>Psych::Exception</span><span class='tstring_end'>]</span></span></pre></dd>
|
108
118
|
|
109
119
|
</dl>
|
110
120
|
|
@@ -120,9 +130,9 @@
|
|
120
130
|
</div>
|
121
131
|
|
122
132
|
<div id="footer">
|
123
|
-
Generated on Tue Dec
|
133
|
+
Generated on Tue Dec 24 15:27:20 2024 by
|
124
134
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
125
|
-
0.9.37 (ruby-3.3
|
135
|
+
0.9.37 (ruby-3.1.3).
|
126
136
|
</div>
|
127
137
|
|
128
138
|
</div>
|
data/enhanced_errors.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |spec|
|
2
2
|
spec.name = "enhanced_errors"
|
3
|
-
spec.version = "3.0.
|
3
|
+
spec.version = "3.0.4"
|
4
4
|
spec.authors = ["Eric Beland"]
|
5
5
|
|
6
6
|
spec.summary = "Automatically enhance your errors with messages containing variable values from the moment they were raised."
|
data/lib/enhanced/context.rb
CHANGED