Welcome to mirror list, hosted at ThFree Co, Russian Federation.

throw_custom_error.js « message « test - github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 97df4fd390ded873365acc2d88ca966f5c6c74c7 (plain)
1
2
3
4
5
6
'use strict';
require('../common');

// custom error throwing
// eslint-disable-next-line no-throw-literal
throw ({ name: 'MyCustomError', message: 'This is a custom message' });