How to use the errlop function in errlop

To help you get started, we’ve selected a few errlop examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github bevry / editions / source / index.ts View on Github external
'unsupported-edition-engines-node-version'
				) === 0
			) {
				fallbackEdition = edition
			}
		}
	}

	// if no edition was suitable for our environment, then try the fallback if it exists
	// that is to say, ignore its engines.node
	if (opts.strict === false && loaded === false && fallbackEdition) {
		try {
			result = loadEdition(fallbackEdition, opts)
			loaded = true
		} catch (editionError) {
			editionsError = new Errlop(editionError, editionsError)
		}
	}

	// if we were able to load something, then provide it
	if (loaded) {
		// make note of any errors if desired
		if (editionsError && verbose) {
			const stderr = opts.stderr || process.stderr
			stderr.write(editionsError.stack + '\n')
		}
		return result
	}
	// otherwise, provide the error
	else if (editionsError) {
		if (opts.packagePath) {
			throw errtion(

errlop

An extended Error class that envelops a parent error, such that the stack trace contains the causation

Artistic-2.0
Latest version published 4 months ago

Package Health Score

70 / 100
Full package analysis