export class HarnessFailure extends Error {
    constructor(message) {
        super(message);
        this.name = "HarnessFailure";
    }
}
export function makeFailModule() {
    function fail(message) {
        throw new HarnessFailure(readNonEmptyString(message, "Harness failure message"));
    }
    return {
        default: fail
    };
}
function readNonEmptyString(value, label) {
    if (typeof value !== "string") {
        throw new Error(`${label} must be a non-empty string.`);
    }
    if (value.trim().length === 0) {
        throw new Error(`${label} must be a non-empty string.`);
    }
    return value;
}
