"use strict";
// SPDX-License-Identifier: Apache-2.0
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.LogError = void 0;
const LogService_1 = __importDefault(require("../../app/service/log/LogService"));
const LogError = (target, propertyKey, descriptor) => {
    const originalMethod = descriptor.value;
    descriptor.value = async function (...args) {
        try {
            const result = await originalMethod.apply(this, args);
            return result;
        }
        catch (error) {
            LogService_1.default.logError(error);
            throw error;
        }
    };
    return descriptor;
};
exports.LogError = LogError;
