Commit caac070
committed
Address maintainer feedback - simplify error handling, expand validation
Changes:
- Remove custom error classes - revert to simple error strings
(maintainer confirmed strings aren't matched, just used for control flow)
- Add devError method to logger for developer-only errors (no TUI output)
- Expand numeric validation to all fields:
- nudgeFrequency: validate >= 1, clamp at runtime
- turnProtection.turns: validate >= 1 (already has runtime check)
- purgeErrors.turns: already validated >= 1
- Add runtime clamping for nudgeFrequency in inject.ts
Fixes maintainer concerns:
1. Custom error classes were overkill for simple control flow
2. Numeric validation now covers all numeric config fields1 parent 3a1f2ba commit caac070
5 files changed
+23
-82
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
337 | 337 | | |
338 | 338 | | |
339 | 339 | | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
340 | 351 | | |
341 | 352 | | |
342 | 353 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | 17 | | |
26 | 18 | | |
27 | 19 | | |
| |||
180 | 172 | | |
181 | 173 | | |
182 | 174 | | |
183 | | - | |
| 175 | + | |
184 | 176 | | |
185 | 177 | | |
186 | 178 | | |
187 | 179 | | |
188 | | - | |
| 180 | + | |
189 | 181 | | |
190 | 182 | | |
191 | 183 | | |
| |||
194 | 186 | | |
195 | 187 | | |
196 | 188 | | |
197 | | - | |
| 189 | + | |
198 | 190 | | |
199 | 191 | | |
200 | 192 | | |
201 | 193 | | |
202 | | - | |
| 194 | + | |
203 | 195 | | |
204 | 196 | | |
205 | 197 | | |
| |||
209 | 201 | | |
210 | 202 | | |
211 | 203 | | |
212 | | - | |
| 204 | + | |
213 | 205 | | |
214 | 206 | | |
215 | 207 | | |
| |||
226 | 218 | | |
227 | 219 | | |
228 | 220 | | |
229 | | - | |
| 221 | + | |
230 | 222 | | |
231 | 223 | | |
232 | 224 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
114 | 119 | | |
115 | 120 | | |
116 | 121 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
260 | 260 | | |
261 | 261 | | |
262 | 262 | | |
263 | | - | |
| 263 | + | |
264 | 264 | | |
265 | 265 | | |
266 | 266 | | |
| |||
0 commit comments