@lvce-editor/verror
Improve error messages by adding additional context to an error
Last updated 10 months ago by levivilet .
MIT · Original npm · Tarball · package.json
$ cnpm install @lvce-editor/verror 
SYNC missed versions from official npm registry.

VError

Improve error messages by adding additional context to an error.

Install

npm install @lvce-editor/verror

Usage

import { VError } from '@lvce-editor/verror'

const otherFunction = () => {
  throw new Error(`oops`)
}

const doSomething = () => {
  try {
    const data = otherFunction()
    return data
  } catch (error) {
    throw new VError(error, `failed to get data`)
  }
}

Gitpod

Open in Gitpod

Current Tags

  • 1.7.0                                ...           latest (10 months ago)

11 Versions

  • 1.7.0                                ...           10 months ago
  • 1.6.0                                ...           a year ago
  • 1.5.0                                ...           a year ago
  • 1.4.0                                ...           2 years ago
  • 1.3.0                                ...           2 years ago
  • 1.2.0                                ...           2 years ago
  • 1.1.2                                ...           2 years ago
  • 1.1.1                                ...           3 years ago
  • 1.1.0                                ...           3 years ago
  • 1.0.1                                ...           3 years ago
  • 1.0.0                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 4
Dependencies (0)
None
Dev Dependencies (0)
None

Copyright 2013 - present © cnpmjs.org | Home |