1.0.5 • Published 3 years ago
pyxerrors v1.0.5
PyxErrors
It's quite easy
const error = require('pyxerrors')
// some code here that will fail
{/** EXAMPLE */}
var logindata = getlogindata()
// here getlogindata returns nothing
if(!logindata) error.error('Login Error', 'You did not login') //you can also use error.e() or error.err() or by invoking the variable itself 'error()'
Properties
Error.name
The first property is the name, this will change the Errors name accordingly Second is the Description Third is the Status Code, for example 404 or 403
error('Name', 'Description', 400)
//returns
Name: Description
at Object.error...
statusCode: 400
Status Code Extensions Coming soon!