How to use the WError function from verror

Find comprehensive JavaScript verror.WError code examples handpicked from public code repositorys.

240
241
242
243
244
245
246
247
248
249
  assert.strictEqual(error1, cause);
});

it('determines cause of nested WError', async () => {
  const error1 = new Error('BOOM');
  const error2 = new verror.WError(error1);
  const error3 = new verror.WError(error2);
  const cause = getRootCause(error3);
  assert.strictEqual(error1, cause);
});
fork icon207
star icon490
watch icon0

+ 39 other calls in file