MCPcopy Create free account
hub / github.com/GoogleChrome/samples / constructor

Method constructor

sqlite-wasm-cos/sqlite3-node.mjs:5195–5205  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected