Improve error messages by adding additional context to an error.
npm install @lvce-editor/verror
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`)
}
}