class AppError extends Error{
constructor(message,statusCode){
super(message)
this.statusCode = statusCode
}
}
AND
class AppError extends Error{
constructor(message,statusCode){
super(message)
this.message=message
this.statusCode = statusCode
}
}
AND
class AppError{
constructor(message,statusCode){
this.message = message
this.statusCode = statusCode
}
}
I am woking on nodeJs project using mongo.During error handling I created this class but not understading difference between these.