| 24 | const errorConstructors = new Map(list); |
| 25 | |
| 26 | export class NonError extends Error { |
| 27 | name = "NonError"; |
| 28 | |
| 29 | constructor(message) { |
| 30 | super(NonError._prepareSuperMessage(message)); |
| 31 | } |
| 32 | |
| 33 | static _prepareSuperMessage(message) { |
| 34 | try { |
| 35 | return JSON.stringify(message); |
| 36 | } catch { |
| 37 | return String(message); |
| 38 | } |
| 39 | } |
| 40 | } |
| 41 | |
| 42 | const commonProperties = [ |
| 43 | { |
nothing calls this directly
no outgoing calls
no test coverage detected