UNPKG

salesforce-alm

Version:

This package contains tools, and APIs, for an improved salesforce.com developer experience.

60 lines (58 loc) 2.88 kB
"use strict"; /* * Copyright (c) 2020, salesforce.com, inc. * All rights reserved. * Licensed under the BSD 3-Clause license. * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ Object.defineProperty(exports, "__esModule", { value: true }); exports.InvalidParameter = exports.MissingRequiredParameter = exports.MissingAppConfig = exports.InvalidProjectWorkspace = void 0; /* -------------------------------------------------------------------------------------------------------------------- * WARNING: This file has been deprecated and should now be considered locked against further changes. Its contents * have been partially or wholely superceded by functionality included in the @salesforce/core npm package, and exists * now to service prior uses in this repository only until they can be ported to use the new @salesforce/core library. * * If you need or want help deciding where to add new functionality or how to migrate to the new library, please * contact the CLI team at alm-cli@salesforce.com. * ----------------------------------------------------------------------------------------------------------------- */ const Messages = require("../messages"); const messages = Messages(); // @Todo Remove this file. Use almError. // @todo remove Validation Error. It's too generic. function InvalidProjectWorkspace() { this.name = 'InvalidProjectWorkspace'; this.code = this.name; this.message = messages.getMessage(this.name, this.code); this.stack = new Error().stack; } exports.InvalidProjectWorkspace = InvalidProjectWorkspace; InvalidProjectWorkspace.prototype = Object.create(Error.prototype); InvalidProjectWorkspace.prototype.constructor = InvalidProjectWorkspace; // ---- function MissingAppConfig() { this.name = 'MissingAppConfig'; this.message = messages.getMessage(this.name); this.code = this.name; } exports.MissingAppConfig = MissingAppConfig; MissingAppConfig.prototype = Object.create(Error.prototype); MissingAppConfig.prototype.constructor = MissingAppConfig; // --- function MissingRequiredParameter(paramName) { this.name = 'MissingRequiredParameter'; this.message = messages.getMessage(this.name, [paramName]); this.code = this.name; } exports.MissingRequiredParameter = MissingRequiredParameter; MissingRequiredParameter.prototype = Object.create(Error.prototype); MissingRequiredParameter.prototype.constructor = MissingRequiredParameter; // --- function InvalidParameter(paramName, reason) { this.name = 'InvalidParameter'; this.message = messages.getMessage(this.name, [paramName, reason]); this.code = this.name; } exports.InvalidParameter = InvalidParameter; InvalidParameter.prototype = Object.create(Error.prototype); InvalidParameter.prototype.constructor = InvalidParameter; //# sourceMappingURL=errors.js.map