Files
huishou/node_modules/nodegit/dist/error.js
T
2026-07-27 13:37:48 +08:00

17 lines
654 B
JavaScript

"use strict";
var util = require("util");
var NodeGit = require("../");
// Deprecated -----------------------------------------------------------------
// In 0.28.0 git_error was majorly refactored to have better naming in libgit2
// We will continue to support the old enum entries but with a deprecation
// warning as they will go away soon.
Object.keys(NodeGit.Error.CODE).forEach(function (key) {
Object.defineProperty(NodeGit.Error.CODE, "GITERR_" + key, {
get: util.deprecate(function () {
return NodeGit.Error.CODE[key];
}, "Use NodeGit.Error.CODE." + key + " instead of " + ("NodeGit.Error.CODE.GETERR_" + key + "."))
});
});