export class RelationGraphError extends Error {
    constructor(message) {
        super(message);
        this.name = 'RelationGraphError';
    }
}
export class DuplicateRelationError extends RelationGraphError {
    sourceId;
    targetId;
    relationType;
    constructor(sourceId, targetId, relationType, message) {
        super(message ??
            `이미 존재하는 관계입니다: ${sourceId} -> ${targetId} (${relationType})`);
        this.sourceId = sourceId;
        this.targetId = targetId;
        this.relationType = relationType;
        this.name = 'DuplicateRelationError';
    }
}
export class CyclicRelationError extends RelationGraphError {
    sourceId;
    targetId;
    relationType;
    constructor(sourceId, targetId, relationType, message) {
        super(message ??
            `순환 참조가 감지되었습니다: ${sourceId} -> ${targetId} (${relationType})`);
        this.sourceId = sourceId;
        this.targetId = targetId;
        this.relationType = relationType;
        this.name = 'CyclicRelationError';
    }
}
//# sourceMappingURL=relation-errors.js.map