If called with 2 arguments and the 2nd one is an object, it behaves like the Error constructor, else it concatenates all arguments together with a single space between each to construct an error message string. As a special case, if called with no arguments then it uses a
(...args)
| 5193 | message. |
| 5194 | */ |
| 5195 | constructor(...args){ |
| 5196 | if(2===args.length && 'object'===typeof args[1]){ |
| 5197 | super(...args); |
| 5198 | }else if(args.length){ |
| 5199 | super(args.join(' ')); |
| 5200 | }else{ |
| 5201 | super("Allocation failed."); |
| 5202 | } |
| 5203 | this.resultCode = capi.SQLITE_NOMEM; |
| 5204 | this.name = 'WasmAllocError'; |
| 5205 | } |
| 5206 | }; |
| 5207 | /** |
| 5208 | Functionally equivalent to the WasmAllocError constructor but may |
nothing calls this directly
no outgoing calls
no test coverage detected