@splash-cli/splash-error

1.0.1 • Public • Published

splash-error

Handle errors

Install

	$ npm install @splash-cli/splash-error --save

	#or

	$ yarn add @splash-cli/splash-error

Usage

	import splashError from 'splash-error';

	// ... function
	try {
		const obj = JSON.parse(`{ \"json\": \"true\" }`)
	} catch (error) {
		splashError(error);
	}

Api

splashError(err, { message, colors })

Throw the given error.

err

Type: Error Error to be thrown

message

Type: String Default: Splash Error Error message

colors

Type: Object Default: { message: 'yellow', error: 'red' } Text colors

License

MIT © Federico Vitale

Readme

Keywords

Package Sidebar

Install

npm i @splash-cli/splash-error

Weekly Downloads

6

Version

1.0.1

License

MIT

Unpacked Size

102 kB

Total Files

7

Last publish

Collaborators

  • rawnly