// SPDX-License-Identifier: Apache-2.0
/**
 * An exception thrown when parsing the output of a helm command fails.
 */
export class HelmParserException extends Error {
    constructor(messageOrCause, cause) {
        if (messageOrCause instanceof Error) {
            super(messageOrCause.message);
            this.cause = messageOrCause;
        }
        else {
            super(messageOrCause);
            if (cause) {
                this.cause = cause;
            }
        }
        this.name = 'HelmParserException';
    }
}
//# sourceMappingURL=helm-parser-exception.js.map