enhanced_errors 3.0.1 → 3.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -387,7 +387,7 @@
387
387
  </div>
388
388
 
389
389
  <div id="footer">
390
- Generated on Tue Dec 17 15:42:48 2024 by
390
+ Generated on Tue Dec 17 21:43:58 2024 by
391
391
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
392
392
  0.9.37 (ruby-3.3.6).
393
393
  </div>
data/doc/Exception.html CHANGED
@@ -111,7 +111,7 @@
111
111
  </div>
112
112
 
113
113
  <div id="footer">
114
- Generated on Tue Dec 17 15:42:48 2024 by
114
+ Generated on Tue Dec 17 21:43:58 2024 by
115
115
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
116
116
  0.9.37 (ruby-3.3.6).
117
117
  </div>
@@ -245,7 +245,7 @@
245
245
  </div>
246
246
 
247
247
  <div id="footer">
248
- Generated on Tue Dec 17 15:42:48 2024 by
248
+ Generated on Tue Dec 17 21:43:58 2024 by
249
249
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
250
250
  0.9.37 (ruby-3.3.6).
251
251
  </div>
data/doc/Minitest.html CHANGED
@@ -202,7 +202,8 @@
202
202
  12
203
203
  13
204
204
  14
205
- 15</pre>
205
+ 15
206
+ 16</pre>
206
207
  </td>
207
208
  <td>
208
209
  <pre class="code"><span class="info file"># File 'lib/enhanced/minitest_patch.rb', line 5</span>
@@ -214,6 +215,7 @@
214
215
  <span class='kw'>begin</span>
215
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>
216
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="EnhancedExceptionContext.html" title="EnhancedExceptionContext (module)">EnhancedExceptionContext</a></span></span><span class='period'>.</span><span class='id identifier rubyid_clear_all'><span class='object_link'><a href="EnhancedExceptionContext.html#clear_all-instance_method" title="EnhancedExceptionContext#clear_all (method)">clear_all</a></span></span>
217
219
  <span class='kw'>rescue</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_e'>e</span>
218
220
  <span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>&quot;</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'>&quot;</span></span>
219
221
  <span class='kw'>end</span>
@@ -228,7 +230,7 @@
228
230
  </div>
229
231
 
230
232
  <div id="footer">
231
- Generated on Tue Dec 17 15:42:48 2024 by
233
+ Generated on Tue Dec 17 21:43:58 2024 by
232
234
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
233
235
  0.9.37 (ruby-3.3.6).
234
236
  </div>
data/doc/_index.html CHANGED
@@ -150,7 +150,7 @@
150
150
  </div>
151
151
 
152
152
  <div id="footer">
153
- Generated on Tue Dec 17 15:42:48 2024 by
153
+ Generated on Tue Dec 17 21:43:58 2024 by
154
154
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
155
155
  0.9.37 (ruby-3.3.6).
156
156
  </div>
data/doc/file.README.html CHANGED
@@ -486,7 +486,7 @@
486
486
  </div></div>
487
487
 
488
488
  <div id="footer">
489
- Generated on Tue Dec 17 15:42:48 2024 by
489
+ Generated on Tue Dec 17 21:43:58 2024 by
490
490
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
491
491
  0.9.37 (ruby-3.3.6).
492
492
  </div>
data/doc/index.html CHANGED
@@ -486,7 +486,7 @@
486
486
  </div></div>
487
487
 
488
488
  <div id="footer">
489
- Generated on Tue Dec 17 15:42:48 2024 by
489
+ Generated on Tue Dec 17 21:43:58 2024 by
490
490
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
491
491
  0.9.37 (ruby-3.3.6).
492
492
  </div>
data/doc/method_list.html CHANGED
@@ -96,30 +96,6 @@
96
96
 
97
97
 
98
98
  <li class="odd ">
99
- <div class="item">
100
- <span class='object_link'><a href="EnhancedErrors.html#capture_events_count-class_method" title="EnhancedErrors.capture_events_count (method)">capture_events_count</a></span>
101
- <small>EnhancedErrors</small>
102
- </div>
103
- </li>
104
-
105
-
106
- <li class="even ">
107
- <div class="item">
108
- <span class='object_link'><a href="EnhancedErrors.html#capture_events_count=-class_method" title="EnhancedErrors.capture_events_count= (method)">capture_events_count=</a></span>
109
- <small>EnhancedErrors</small>
110
- </div>
111
- </li>
112
-
113
-
114
- <li class="odd ">
115
- <div class="item">
116
- <span class='object_link'><a href="EnhancedErrors.html#capture_limit_exceeded%3F-class_method" title="EnhancedErrors.capture_limit_exceeded? (method)">capture_limit_exceeded?</a></span>
117
- <small>EnhancedErrors</small>
118
- </div>
119
- </li>
120
-
121
-
122
- <li class="even ">
123
99
  <div class="item">
124
100
  <span class='object_link'><a href="EnhancedErrors.html#capture_rescue-class_method" title="EnhancedErrors.capture_rescue (method)">capture_rescue</a></span>
125
101
  <small>EnhancedErrors</small>
@@ -127,7 +103,7 @@
127
103
  </li>
128
104
 
129
105
 
130
- <li class="odd ">
106
+ <li class="even ">
131
107
  <div class="item">
132
108
  <span class='object_link'><a href="EnhancedErrors.html#capture_rescue=-class_method" title="EnhancedErrors.capture_rescue= (method)">capture_rescue=</a></span>
133
109
  <small>EnhancedErrors</small>
@@ -135,7 +111,7 @@
135
111
  </li>
136
112
 
137
113
 
138
- <li class="even ">
114
+ <li class="odd ">
139
115
  <div class="item">
140
116
  <span class='object_link'><a href="ExceptionBindingInfos.html#captured_variables-instance_method" title="ExceptionBindingInfos#captured_variables (method)">#captured_variables</a></span>
141
117
  <small>ExceptionBindingInfos</small>
@@ -143,7 +119,7 @@
143
119
  </li>
144
120
 
145
121
 
146
- <li class="odd ">
122
+ <li class="even ">
147
123
  <div class="item">
148
124
  <span class='object_link'><a href="EnhancedErrors.html#class_to_string-class_method" title="EnhancedErrors.class_to_string (method)">class_to_string</a></span>
149
125
  <small>EnhancedErrors</small>
@@ -151,7 +127,7 @@
151
127
  </li>
152
128
 
153
129
 
154
- <li class="even ">
130
+ <li class="odd ">
155
131
  <div class="item">
156
132
  <span class='object_link'><a href="EnhancedExceptionContext.html#clear_all-instance_method" title="EnhancedExceptionContext#clear_all (method)">#clear_all</a></span>
157
133
  <small>EnhancedExceptionContext</small>
@@ -159,7 +135,7 @@
159
135
  </li>
160
136
 
161
137
 
162
- <li class="odd ">
138
+ <li class="even ">
163
139
  <div class="item">
164
140
  <span class='object_link'><a href="EnhancedExceptionContext.html#clear_context-instance_method" title="EnhancedExceptionContext#clear_context (method)">#clear_context</a></span>
165
141
  <small>EnhancedExceptionContext</small>
@@ -167,7 +143,7 @@
167
143
  </li>
168
144
 
169
145
 
170
- <li class="even ">
146
+ <li class="odd ">
171
147
  <div class="item">
172
148
  <span class='object_link'><a href="Enhanced/Colors.html#code-class_method" title="Enhanced::Colors.code (method)">code</a></span>
173
149
  <small>Enhanced::Colors</small>
@@ -175,7 +151,7 @@
175
151
  </li>
176
152
 
177
153
 
178
- <li class="odd ">
154
+ <li class="even ">
179
155
  <div class="item">
180
156
  <span class='object_link'><a href="Enhanced/Colors.html#color-class_method" title="Enhanced::Colors.color (method)">color</a></span>
181
157
  <small>Enhanced::Colors</small>
@@ -183,7 +159,7 @@
183
159
  </li>
184
160
 
185
161
 
186
- <li class="even ">
162
+ <li class="odd ">
187
163
  <div class="item">
188
164
  <span class='object_link'><a href="EnhancedErrors.html#config_block-class_method" title="EnhancedErrors.config_block (method)">config_block</a></span>
189
165
  <small>EnhancedErrors</small>
@@ -191,7 +167,7 @@
191
167
  </li>
192
168
 
193
169
 
194
- <li class="odd ">
170
+ <li class="even ">
195
171
  <div class="item">
196
172
  <span class='object_link'><a href="EnhancedExceptionContext.html#context_for-instance_method" title="EnhancedExceptionContext#context_for (method)">#context_for</a></span>
197
173
  <small>EnhancedExceptionContext</small>
@@ -199,7 +175,7 @@
199
175
  </li>
200
176
 
201
177
 
202
- <li class="even ">
178
+ <li class="odd ">
203
179
  <div class="item">
204
180
  <span class='object_link'><a href="EnhancedErrors.html#convert_binding_to_binding_info-class_method" title="EnhancedErrors.convert_binding_to_binding_info (method)">convert_binding_to_binding_info</a></span>
205
181
  <small>EnhancedErrors</small>
@@ -207,7 +183,7 @@
207
183
  </li>
208
184
 
209
185
 
210
- <li class="odd ">
186
+ <li class="even ">
211
187
  <div class="item">
212
188
  <span class='object_link'><a href="EnhancedErrors.html#disable_capturing!-class_method" title="EnhancedErrors.disable_capturing! (method)">disable_capturing!</a></span>
213
189
  <small>EnhancedErrors</small>
@@ -215,7 +191,7 @@
215
191
  </li>
216
192
 
217
193
 
218
- <li class="even ">
194
+ <li class="odd ">
219
195
  <div class="item">
220
196
  <span class='object_link'><a href="EnhancedErrors.html#eligible_for_capture-class_method" title="EnhancedErrors.eligible_for_capture (method)">eligible_for_capture</a></span>
221
197
  <small>EnhancedErrors</small>
@@ -223,7 +199,7 @@
223
199
  </li>
224
200
 
225
201
 
226
- <li class="odd ">
202
+ <li class="even ">
227
203
  <div class="item">
228
204
  <span class='object_link'><a href="EnhancedErrors.html#enabled-class_method" title="EnhancedErrors.enabled (method)">enabled</a></span>
229
205
  <small>EnhancedErrors</small>
@@ -231,7 +207,7 @@
231
207
  </li>
232
208
 
233
209
 
234
- <li class="even ">
210
+ <li class="odd ">
235
211
  <div class="item">
236
212
  <span class='object_link'><a href="Enhanced/Colors.html#enabled=-class_method" title="Enhanced::Colors.enabled= (method)">enabled=</a></span>
237
213
  <small>Enhanced::Colors</small>
@@ -239,7 +215,7 @@
239
215
  </li>
240
216
 
241
217
 
242
- <li class="odd ">
218
+ <li class="even ">
243
219
  <div class="item">
244
220
  <span class='object_link'><a href="Enhanced/Colors.html#enabled%3F-class_method" title="Enhanced::Colors.enabled? (method)">enabled?</a></span>
245
221
  <small>Enhanced::Colors</small>
@@ -247,17 +223,9 @@
247
223
  </li>
248
224
 
249
225
 
250
- <li class="even ">
251
- <div class="item">
252
- <span class='object_link'><a href="EnhancedErrors.html#enhance_exceptions!-class_method" title="EnhancedErrors.enhance_exceptions! (method)">enhance_exceptions!</a></span>
253
- <small>EnhancedErrors</small>
254
- </div>
255
- </li>
256
-
257
-
258
226
  <li class="odd ">
259
227
  <div class="item">
260
- <span class='object_link'><a href="EnhancedErrors.html#exception_trace-class_method" title="EnhancedErrors.exception_trace (method)">exception_trace</a></span>
228
+ <span class='object_link'><a href="EnhancedErrors.html#enhance_exceptions!-class_method" title="EnhancedErrors.enhance_exceptions! (method)">enhance_exceptions!</a></span>
261
229
  <small>EnhancedErrors</small>
262
230
  </div>
263
231
  </li>
@@ -265,7 +233,7 @@
265
233
 
266
234
  <li class="even ">
267
235
  <div class="item">
268
- <span class='object_link'><a href="EnhancedErrors.html#format-class_method" title="EnhancedErrors.format (method)">format</a></span>
236
+ <span class='object_link'><a href="EnhancedErrors.html#exception_trace-class_method" title="EnhancedErrors.exception_trace (method)">exception_trace</a></span>
269
237
  <small>EnhancedErrors</small>
270
238
  </div>
271
239
  </li>
@@ -273,7 +241,7 @@
273
241
 
274
242
  <li class="odd ">
275
243
  <div class="item">
276
- <span class='object_link'><a href="EnhancedErrors.html#get_default_format_for_environment-class_method" title="EnhancedErrors.get_default_format_for_environment (method)">get_default_format_for_environment</a></span>
244
+ <span class='object_link'><a href="EnhancedErrors.html#format-class_method" title="EnhancedErrors.format (method)">format</a></span>
277
245
  <small>EnhancedErrors</small>
278
246
  </div>
279
247
  </li>
@@ -281,7 +249,7 @@
281
249
 
282
250
  <li class="even ">
283
251
  <div class="item">
284
- <span class='object_link'><a href="EnhancedErrors.html#increment_capture_events_count-class_method" title="EnhancedErrors.increment_capture_events_count (method)">increment_capture_events_count</a></span>
252
+ <span class='object_link'><a href="EnhancedErrors.html#get_default_format_for_environment-class_method" title="EnhancedErrors.get_default_format_for_environment (method)">get_default_format_for_environment</a></span>
285
253
  <small>EnhancedErrors</small>
286
254
  </div>
287
255
  </li>
@@ -311,22 +279,6 @@
311
279
  </li>
312
280
 
313
281
 
314
- <li class="even ">
315
- <div class="item">
316
- <span class='object_link'><a href="EnhancedErrors.html#max_capture_events-class_method" title="EnhancedErrors.max_capture_events (method)">max_capture_events</a></span>
317
- <small>EnhancedErrors</small>
318
- </div>
319
- </li>
320
-
321
-
322
- <li class="odd ">
323
- <div class="item">
324
- <span class='object_link'><a href="EnhancedErrors.html#max_capture_events=-class_method" title="EnhancedErrors.max_capture_events= (method)">max_capture_events=</a></span>
325
- <small>EnhancedErrors</small>
326
- </div>
327
- </li>
328
-
329
-
330
282
  <li class="even ">
331
283
  <div class="item">
332
284
  <span class='object_link'><a href="EnhancedErrors.html#max_capture_length-class_method" title="EnhancedErrors.max_capture_length (method)">max_capture_length</a></span>
@@ -448,14 +400,6 @@
448
400
 
449
401
 
450
402
  <li class="odd ">
451
- <div class="item">
452
- <span class='object_link'><a href="EnhancedErrors.html#safe_prepend_module-class_method" title="EnhancedErrors.safe_prepend_module (method)">safe_prepend_module</a></span>
453
- <small>EnhancedErrors</small>
454
- </div>
455
- </li>
456
-
457
-
458
- <li class="even ">
459
403
  <div class="item">
460
404
  <span class='object_link'><a href="EnhancedErrors.html#skip_list-class_method" title="EnhancedErrors.skip_list (method)">skip_list</a></span>
461
405
  <small>EnhancedErrors</small>
@@ -463,7 +407,7 @@
463
407
  </li>
464
408
 
465
409
 
466
- <li class="odd ">
410
+ <li class="even ">
467
411
  <div class="item">
468
412
  <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>
469
413
  <small>EnhancedErrors</small>
@@ -471,7 +415,7 @@
471
415
  </li>
472
416
 
473
417
 
474
- <li class="even ">
418
+ <li class="odd ">
475
419
  <div class="item">
476
420
  <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>
477
421
  <small>EnhancedErrors</small>
@@ -479,7 +423,7 @@
479
423
  </li>
480
424
 
481
425
 
482
- <li class="odd ">
426
+ <li class="even ">
483
427
  <div class="item">
484
428
  <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>
485
429
  <small>EnhancedErrors</small>
@@ -487,7 +431,7 @@
487
431
  </li>
488
432
 
489
433
 
490
- <li class="even ">
434
+ <li class="odd ">
491
435
  <div class="item">
492
436
  <span class='object_link'><a href="EnhancedErrors.html#stop_rspec_binding_capture-class_method" title="EnhancedErrors.stop_rspec_binding_capture (method)">stop_rspec_binding_capture</a></span>
493
437
  <small>EnhancedErrors</small>
@@ -495,7 +439,7 @@
495
439
  </li>
496
440
 
497
441
 
498
- <li class="odd ">
442
+ <li class="even ">
499
443
  <div class="item">
500
444
  <span class='object_link'><a href="EnhancedExceptionContext.html#store_context-instance_method" title="EnhancedExceptionContext#store_context (method)">#store_context</a></span>
501
445
  <small>EnhancedExceptionContext</small>
@@ -503,7 +447,7 @@
503
447
  </li>
504
448
 
505
449
 
506
- <li class="even ">
450
+ <li class="odd ">
507
451
  <div class="item">
508
452
  <span class='object_link'><a href="EnhancedErrors.html#validate_binding_format-class_method" title="EnhancedErrors.validate_binding_format (method)">validate_binding_format</a></span>
509
453
  <small>EnhancedErrors</small>
@@ -102,11 +102,9 @@
102
102
  <dt id="IGNORED_EXCEPTIONS-constant" class="">IGNORED_EXCEPTIONS =
103
103
 
104
104
  </dt>
105
- <dd><pre class="code"><span class='qwords_beg'>%w[</span><span class='tstring_content'>SystemExit</span><span class='words_sep'> </span><span class='tstring_content'>NoMemoryError</span><span class='words_sep'> </span><span class='tstring_content'>SignalException</span><span class='words_sep'> </span><span class='tstring_content'>Interrupt</span><span class='words_sep'>
106
- </span><span class='tstring_content'>ScriptError</span><span class='words_sep'> </span><span class='tstring_content'>LoadError</span><span class='words_sep'> </span><span class='tstring_content'>NotImplementedError</span><span class='words_sep'> </span><span class='tstring_content'>SyntaxError</span><span class='words_sep'>
107
- </span><span class='tstring_content'>RSpec::Expectations::ExpectationNotMetError</span><span class='words_sep'>
108
- </span><span class='tstring_content'>RSpec::Matchers::BuiltIn::RaiseError</span><span class='words_sep'>
109
- </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>
105
+ <dd><pre class="code"><span class='qwords_beg'>%w[</span><span class='tstring_content'>SystemExit</span><span class='words_sep'> </span><span class='tstring_content'>NoMemoryError</span><span class='words_sep'> </span><span class='tstring_content'>SignalException</span><span class='words_sep'> </span><span class='tstring_content'>Interrupt</span><span class='words_sep'> </span><span class='tstring_content'>ScriptError</span><span class='words_sep'> </span><span class='tstring_content'>LoadError</span><span class='words_sep'>
106
+ </span><span class='tstring_content'>NotImplementedError</span><span class='words_sep'> </span><span class='tstring_content'>SyntaxError</span><span class='words_sep'> </span><span class='tstring_content'>RSpec::Expectations::ExpectationNotMetError</span><span class='words_sep'>
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>
110
108
 
111
109
  </dl>
112
110
 
@@ -122,7 +120,7 @@
122
120
  </div>
123
121
 
124
122
  <div id="footer">
125
- Generated on Tue Dec 17 15:42:48 2024 by
123
+ Generated on Tue Dec 17 21:43:58 2024 by
126
124
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
127
125
  0.9.37 (ruby-3.3.6).
128
126
  </div>
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "enhanced_errors"
3
- spec.version = "3.0.1"
3
+ spec.version = "3.0.3"
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."
@@ -9,6 +9,7 @@ module Minitest
9
9
  begin
10
10
  binding_infos = EnhancedErrors.stop_minitest_binding_capture
11
11
  EnhancedErrors.override_exception_message(result.failures.last, binding_infos) if result.failures.any?
12
+ EnhancedExceptionContext.clear_all
12
13
  rescue => e
13
14
  puts "Ignored error during error enhancement: #{e}"
14
15
  end