1.0.0 • Published 8 years ago
engine-comp-crud-errors v1.0.0
engine-comp-crud-errors
Errors for the CRUD modules.
Installation
$ npm i --save engine-comp-crud-errors
Example
const errors = require("engine-comp-crud-errors");
console.log(errors.INSTANCE_EXISTS_ALREADY("layout"));
// => {
// [Error: The layout instance exists already.]
// code: 'INSTANCE_EXISTS_ALREADY',
// instance_name: 'layout'
// }
console.log(errors.INSTANCE_DOES_NOT_EXIST("layout"));
// => {
// [Error: The layout instance does not exist.]
// code: 'INSTANCE_DOES_NOT_EXIST',
// instance_name: 'layout'
// }
Documentation
INSTANCE_EXISTS_ALREADY(name)
Params
- String
name
: The instance name.
Return
- Error The error object.
INSTANCE_DOES_NOT_EXIST(name)
Params
- String
name
: The instance name.
Return
- Error The error object.
How to contribute
Have an idea? Found a bug? See how to contribute.
Where is this library used?
If you are using this library in one of your projects, add it in this list. :sparkles:
License
1.0.0
8 years ago