ren-framework
Version:
42 lines (38 loc) • 772 B
JavaScript
const HttpError = require('./HttpError');
/**
* NotFoundError
* 不存在错误
* -------------
* @author Verdient。
*/
class NotFoundError extends HttpError
{
/**
* constructor(String message, Mixed data)
* 构造函数
* ---------------------------------------
* @param {String} message 错误信息
* @param {Mixed} data 附加的数据
* -------------------------------
* @inheritdoc
* -----------
* @author Verdient。
*/
constructor(message, data){
super(message || 'Not Found', 404, data);
}
/**
* @getter type()
* 获取错误类型
* --------------
* @inheritdoc
* -----------
* @return {String}
* @author Verdient。
*/
get type(){
return 'Not Found Error';
}
}
module.exports = NotFoundError;