К
Який фреймворк використовуєте (якщо використовуєте взагалі)?
Size: a a a
К
AP
К
AP
К
AP
К
// ErrorHandler.js
const logger = require("path-to-logger");
class ErrorHandler {
static handleErrorOne(error) {
logger.error("Oh no, the error!");
}
static handleErrorTwo(error) {
logger.error("So many errors :C");
}
}
// anotherFile.js
const ErrorHandler = require("path-to-error-handler");
function typicalMethod(arg1, agr2) {
try {
methodThatPotentiallyThrowsError();
} catch (error) {
ErrorHandler.handleErrorOne(error);
}
}
К
Error
.AP
TS
К
A
TS
К
TS
К
К
A
К
A