Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function errtion({ message, code, level }, parent) {
if (this) throw new Error('errtion is not to be created with new')
const error = new Errlop(message, parent)
if (code) error.code = code
if (level) error.level = level
return error
}