enhanced_errors 2.1.3 → 3.0.0
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.
- checksums.yaml +4 -4
- data/.yardoc/checksums +4 -2
- data/.yardoc/object_types +0 -0
- data/.yardoc/objects/root.dat +0 -0
- data/README.md +2 -2
- data/doc/Context.html +283 -0
- data/doc/Enhanced/Colors.html +1 -1
- data/doc/Enhanced.html +1 -1
- data/doc/EnhancedErrors.html +350 -382
- data/doc/EnhancedExceptionContext.html +397 -0
- data/doc/Exception.html +9 -139
- data/doc/ExceptionBindingInfos.html +255 -0
- data/doc/Minitest.html +1 -1
- data/doc/_index.html +16 -1
- data/doc/class_list.html +1 -1
- data/doc/file.README.html +3 -3
- data/doc/index.html +3 -3
- data/doc/method_list.html +87 -39
- data/doc/top-level-namespace.html +3 -3
- data/enhanced_errors.gemspec +1 -1
- data/examples/demo_rspec.rb +0 -4
- data/lib/enhanced/context.rb +7 -0
- data/lib/enhanced/enhanced_exception_context.rb +47 -0
- data/lib/enhanced/exception.rb +15 -5
- data/lib/enhanced_errors.rb +20 -44
- metadata +8 -3
@@ -0,0 +1,255 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
|
+
<title>
|
7
|
+
Module: ExceptionBindingInfos
|
8
|
+
|
9
|
+
— Documentation by YARD 0.9.37
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="css/style.css" type="text/css" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="css/common.css" type="text/css" />
|
16
|
+
|
17
|
+
<script type="text/javascript">
|
18
|
+
pathId = "ExceptionBindingInfos";
|
19
|
+
relpath = '';
|
20
|
+
</script>
|
21
|
+
|
22
|
+
|
23
|
+
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
|
24
|
+
|
25
|
+
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
|
26
|
+
|
27
|
+
|
28
|
+
</head>
|
29
|
+
<body>
|
30
|
+
<div class="nav_wrap">
|
31
|
+
<iframe id="nav" src="class_list.html?1"></iframe>
|
32
|
+
<div id="resizer"></div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div id="main" tabindex="-1">
|
36
|
+
<div id="header">
|
37
|
+
<div id="menu">
|
38
|
+
|
39
|
+
<a href="_index.html">Index (E)</a> »
|
40
|
+
|
41
|
+
|
42
|
+
<span class="title">ExceptionBindingInfos</span>
|
43
|
+
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<div id="search">
|
47
|
+
|
48
|
+
<a class="full_list_link" id="class_list_link"
|
49
|
+
href="class_list.html">
|
50
|
+
|
51
|
+
<svg width="24" height="24">
|
52
|
+
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
53
|
+
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
54
|
+
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
55
|
+
</svg>
|
56
|
+
</a>
|
57
|
+
|
58
|
+
</div>
|
59
|
+
<div class="clear"></div>
|
60
|
+
</div>
|
61
|
+
|
62
|
+
<div id="content"><h1>Module: ExceptionBindingInfos
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
</h1>
|
67
|
+
<div class="box_info">
|
68
|
+
|
69
|
+
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
<dl>
|
78
|
+
<dt>Included in:</dt>
|
79
|
+
<dd><span class='object_link'><a href="Exception.html" title="Exception (class)">Exception</a></span></dd>
|
80
|
+
</dl>
|
81
|
+
|
82
|
+
|
83
|
+
|
84
|
+
<dl>
|
85
|
+
<dt>Defined in:</dt>
|
86
|
+
<dd>lib/enhanced/exception.rb</dd>
|
87
|
+
</dl>
|
88
|
+
|
89
|
+
</div>
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
<h2>
|
100
|
+
Instance Method Summary
|
101
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
102
|
+
</h2>
|
103
|
+
|
104
|
+
<ul class="summary">
|
105
|
+
|
106
|
+
<li class="public ">
|
107
|
+
<span class="summary_signature">
|
108
|
+
|
109
|
+
<a href="#binding_infos-instance_method" title="#binding_infos (instance method)">#<strong>binding_infos</strong> ⇒ Object </a>
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
</span>
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
124
|
+
|
125
|
+
</li>
|
126
|
+
|
127
|
+
|
128
|
+
<li class="public ">
|
129
|
+
<span class="summary_signature">
|
130
|
+
|
131
|
+
<a href="#captured_variables-instance_method" title="#captured_variables (instance method)">#<strong>captured_variables</strong> ⇒ Object </a>
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
</span>
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
146
|
+
|
147
|
+
</li>
|
148
|
+
|
149
|
+
|
150
|
+
</ul>
|
151
|
+
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
<div id="instance_method_details" class="method_details_list">
|
156
|
+
<h2>Instance Method Details</h2>
|
157
|
+
|
158
|
+
|
159
|
+
<div class="method_details first">
|
160
|
+
<h3 class="signature first" id="binding_infos-instance_method">
|
161
|
+
|
162
|
+
#<strong>binding_infos</strong> ⇒ <tt>Object</tt>
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
|
168
|
+
</h3><table class="source_code">
|
169
|
+
<tr>
|
170
|
+
<td>
|
171
|
+
<pre class="lines">
|
172
|
+
|
173
|
+
|
174
|
+
5
|
175
|
+
6
|
176
|
+
7
|
177
|
+
8
|
178
|
+
9
|
179
|
+
10
|
180
|
+
11
|
181
|
+
12</pre>
|
182
|
+
</td>
|
183
|
+
<td>
|
184
|
+
<pre class="code"><span class="info file"># File 'lib/enhanced/exception.rb', line 5</span>
|
185
|
+
|
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="EnhancedExceptionContext.html" title="EnhancedExceptionContext (module)">EnhancedExceptionContext</a></span></span><span class='period'>.</span><span class='id identifier rubyid_context_for'><span class='object_link'><a href="EnhancedExceptionContext.html#context_for-instance_method" title="EnhancedExceptionContext#context_for (method)">context_for</a></span></span><span class='lparen'>(</span><span class='kw'>self</span><span class='rparen'>)</span>
|
188
|
+
<span class='kw'>unless</span> <span class='id identifier rubyid_ctx'>ctx</span>
|
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="EnhancedExceptionContext.html" title="EnhancedExceptionContext (module)">EnhancedExceptionContext</a></span></span><span class='period'>.</span><span class='id identifier rubyid_store_context'><span class='object_link'><a href="EnhancedExceptionContext.html#store_context-instance_method" title="EnhancedExceptionContext#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
|
+
<span class='kw'>end</span>
|
192
|
+
<span class='id identifier rubyid_ctx'>ctx</span><span class='period'>.</span><span class='id identifier rubyid_binding_infos'>binding_infos</span>
|
193
|
+
<span class='kw'>end</span></pre>
|
194
|
+
</td>
|
195
|
+
</tr>
|
196
|
+
</table>
|
197
|
+
</div>
|
198
|
+
|
199
|
+
<div class="method_details ">
|
200
|
+
<h3 class="signature " id="captured_variables-instance_method">
|
201
|
+
|
202
|
+
#<strong>captured_variables</strong> ⇒ <tt>Object</tt>
|
203
|
+
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
|
208
|
+
</h3><table class="source_code">
|
209
|
+
<tr>
|
210
|
+
<td>
|
211
|
+
<pre class="lines">
|
212
|
+
|
213
|
+
|
214
|
+
14
|
215
|
+
15
|
216
|
+
16
|
217
|
+
17
|
218
|
+
18
|
219
|
+
19
|
220
|
+
20
|
221
|
+
21
|
222
|
+
22
|
223
|
+
23</pre>
|
224
|
+
</td>
|
225
|
+
<td>
|
226
|
+
<pre class="code"><span class="info file"># File 'lib/enhanced/exception.rb', line 14</span>
|
227
|
+
|
228
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_captured_variables'>captured_variables</span>
|
229
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_binding_infos'>binding_infos</span><span class='period'>.</span><span class='id identifier rubyid_any?'>any?</span>
|
230
|
+
<span class='id identifier rubyid_bindings_of_interest'>bindings_of_interest</span> <span class='op'>=</span> <span class='id identifier rubyid_select_binding_infos'>select_binding_infos</span>
|
231
|
+
<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_format'><span class='object_link'><a href="EnhancedErrors.html#format-class_method" title="EnhancedErrors.format (method)">format</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_bindings_of_interest'>bindings_of_interest</span><span class='rparen'>)</span>
|
232
|
+
<span class='kw'>else</span>
|
233
|
+
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span>
|
234
|
+
<span class='kw'>end</span>
|
235
|
+
<span class='kw'>rescue</span>
|
236
|
+
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span>
|
237
|
+
<span class='kw'>end</span></pre>
|
238
|
+
</td>
|
239
|
+
</tr>
|
240
|
+
</table>
|
241
|
+
</div>
|
242
|
+
|
243
|
+
</div>
|
244
|
+
|
245
|
+
</div>
|
246
|
+
|
247
|
+
<div id="footer">
|
248
|
+
Generated on Tue Dec 17 15:42:48 2024 by
|
249
|
+
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
250
|
+
0.9.37 (ruby-3.3.6).
|
251
|
+
</div>
|
252
|
+
|
253
|
+
</div>
|
254
|
+
</body>
|
255
|
+
</html>
|
data/doc/Minitest.html
CHANGED
@@ -228,7 +228,7 @@
|
|
228
228
|
</div>
|
229
229
|
|
230
230
|
<div id="footer">
|
231
|
-
Generated on
|
231
|
+
Generated on Tue Dec 17 15:42:48 2024 by
|
232
232
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
233
233
|
0.9.37 (ruby-3.3.6).
|
234
234
|
</div>
|
data/doc/_index.html
CHANGED
@@ -87,6 +87,11 @@
|
|
87
87
|
|
88
88
|
</li>
|
89
89
|
|
90
|
+
<li>
|
91
|
+
<span class='object_link'><a href="Context.html" title="Context (class)">Context</a></span>
|
92
|
+
|
93
|
+
</li>
|
94
|
+
|
90
95
|
</ul>
|
91
96
|
</ul>
|
92
97
|
|
@@ -105,11 +110,21 @@
|
|
105
110
|
|
106
111
|
</li>
|
107
112
|
|
113
|
+
<li>
|
114
|
+
<span class='object_link'><a href="EnhancedExceptionContext.html" title="EnhancedExceptionContext (module)">EnhancedExceptionContext</a></span>
|
115
|
+
|
116
|
+
</li>
|
117
|
+
|
108
118
|
<li>
|
109
119
|
<span class='object_link'><a href="Exception.html" title="Exception (class)">Exception</a></span>
|
110
120
|
|
111
121
|
</li>
|
112
122
|
|
123
|
+
<li>
|
124
|
+
<span class='object_link'><a href="ExceptionBindingInfos.html" title="ExceptionBindingInfos (module)">ExceptionBindingInfos</a></span>
|
125
|
+
|
126
|
+
</li>
|
127
|
+
|
113
128
|
</ul>
|
114
129
|
</ul>
|
115
130
|
|
@@ -135,7 +150,7 @@
|
|
135
150
|
</div>
|
136
151
|
|
137
152
|
<div id="footer">
|
138
|
-
Generated on
|
153
|
+
Generated on Tue Dec 17 15:42:48 2024 by
|
139
154
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
140
155
|
0.9.37 (ruby-3.3.6).
|
141
156
|
</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_Context' class='even'><div class='item' style='padding-left:30px'><span class='object_link'><a href="Context.html" title="Context (class)">Context</a></span> < Object<small class='search_info'>Top Level Namespace</small></div></li><li id='object_Enhanced' class='odd'><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 even'><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></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_EnhancedExceptionContext' class='even'><div class='item' style='padding-left:30px'><span class='object_link'><a href="EnhancedExceptionContext.html" title="EnhancedExceptionContext (module)">EnhancedExceptionContext</a></span><small class='search_info'>Top Level Namespace</small></div></li><li id='object_Exception' class='odd'><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_ExceptionBindingInfos' class='even'><div class='item' style='padding-left:30px'><span class='object_link'><a href="ExceptionBindingInfos.html" title="ExceptionBindingInfos (module)">ExceptionBindingInfos</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
@@ -243,7 +243,7 @@
|
|
243
243
|
<p>You can pass configuration options to <code>enhance_exceptions!</code>:</p>
|
244
244
|
|
245
245
|
<pre class="code ruby"><code class="ruby">
|
246
|
-
<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_enhance_exceptions!'><span class='object_link'><a href="EnhancedErrors.html#enhance_exceptions!-class_method" title="EnhancedErrors.enhance_exceptions! (method)">enhance_exceptions!</a></span></span><span class='lparen'>(</span><span class='label'>enabled:</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='label'>
|
246
|
+
<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_enhance_exceptions!'><span class='object_link'><a href="EnhancedErrors.html#enhance_exceptions!-class_method" title="EnhancedErrors.enhance_exceptions! (method)">enhance_exceptions!</a></span></span><span class='lparen'>(</span><span class='label'>enabled:</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='label'>max_capture_length:</span> <span class='int'>2000</span><span class='rparen'>)</span> <span class='kw'>do</span>
|
247
247
|
<span class='comment'># Additional configuration here
|
248
248
|
</span> <span class='id identifier rubyid_add_to_skip_list'>add_to_skip_list</span> <span class='symbol'>:@instance_variable_to_skip</span><span class='comma'>,</span> <span class='symbol'>:local_to_skip</span>
|
249
249
|
<span class='kw'>end</span>
|
@@ -253,7 +253,7 @@
|
|
253
253
|
</li><li>
|
254
254
|
<p><code>enabled</code>: Enables or disables the enhancement (default: <code>true</code>).</p>
|
255
255
|
</li><li>
|
256
|
-
<p><code>
|
256
|
+
<p><code>max_capture_length</code>: Sets the maximum length of the captured_variables string (default: <code>2500</code>).</p>
|
257
257
|
</li></ul>
|
258
258
|
|
259
259
|
<h3 id="label-Environment-Based+Defaults">Environment-Based Defaults</h3>
|
@@ -486,7 +486,7 @@
|
|
486
486
|
</div></div>
|
487
487
|
|
488
488
|
<div id="footer">
|
489
|
-
Generated on
|
489
|
+
Generated on Tue Dec 17 15:42:48 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
@@ -243,7 +243,7 @@
|
|
243
243
|
<p>You can pass configuration options to <code>enhance_exceptions!</code>:</p>
|
244
244
|
|
245
245
|
<pre class="code ruby"><code class="ruby">
|
246
|
-
<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_enhance_exceptions!'><span class='object_link'><a href="EnhancedErrors.html#enhance_exceptions!-class_method" title="EnhancedErrors.enhance_exceptions! (method)">enhance_exceptions!</a></span></span><span class='lparen'>(</span><span class='label'>enabled:</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='label'>
|
246
|
+
<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_enhance_exceptions!'><span class='object_link'><a href="EnhancedErrors.html#enhance_exceptions!-class_method" title="EnhancedErrors.enhance_exceptions! (method)">enhance_exceptions!</a></span></span><span class='lparen'>(</span><span class='label'>enabled:</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='label'>max_capture_length:</span> <span class='int'>2000</span><span class='rparen'>)</span> <span class='kw'>do</span>
|
247
247
|
<span class='comment'># Additional configuration here
|
248
248
|
</span> <span class='id identifier rubyid_add_to_skip_list'>add_to_skip_list</span> <span class='symbol'>:@instance_variable_to_skip</span><span class='comma'>,</span> <span class='symbol'>:local_to_skip</span>
|
249
249
|
<span class='kw'>end</span>
|
@@ -253,7 +253,7 @@
|
|
253
253
|
</li><li>
|
254
254
|
<p><code>enabled</code>: Enables or disables the enhancement (default: <code>true</code>).</p>
|
255
255
|
</li><li>
|
256
|
-
<p><code>
|
256
|
+
<p><code>max_capture_length</code>: Sets the maximum length of the captured_variables string (default: <code>2500</code>).</p>
|
257
257
|
</li></ul>
|
258
258
|
|
259
259
|
<h3 id="label-Environment-Based+Defaults">Environment-Based Defaults</h3>
|
@@ -486,7 +486,7 @@
|
|
486
486
|
</div></div>
|
487
487
|
|
488
488
|
<div id="footer">
|
489
|
-
Generated on
|
489
|
+
Generated on Tue Dec 17 15:42:48 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>
|