mirror of
https://github.com/Sevichecc/Urara-Blog.git
synced 2025-05-03 05:09:30 +08:00
15 lines
441 B
Text
15 lines
441 B
Text
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
const utils = require("../../utils");
|
|
class ErrorFilter {
|
|
constructor(_settings) {
|
|
this._settings = _settings;
|
|
}
|
|
getFilter() {
|
|
return (error) => this._isNonFatalError(error);
|
|
}
|
|
_isNonFatalError(error) {
|
|
return utils.errno.isEnoentCodeError(error) || this._settings.suppressErrors;
|
|
}
|
|
}
|
|
exports.default = ErrorFilter;
|