Skip to content

Commit 496ac90

Browse files
committed
docs(errors): 사이트 docs 전체에서 옛 명명 흔적 제거 (영/한, 53개 파일)
Phase 1(직전 커밋)에서 튜토리얼 13/14/15/16 self-contained framework를 정렬했고, 이번 커밋은 Docs.Site 전체로 범위를 넓혀 산문·예시·로그 샘플에 잔존하던 옛 명명을 모두 신규 1.0.0-alpha.4+ 기준으로 통일. Cat B (산문 옛 type/factory 이름): - spec/04-error-system.md (영/한): 마이그레이션 매핑 표를 제거하고 "릴리스 노트 참조" 한 줄로 단축. spec 본문에 옛 이름 노출 금지 정책. Cat C (옛 prefix DomainErrors.X.Y → Domain.X.Y): - guides/{adapter,application,domain,observability}/*.md - spec/03-validation.md, spec/06-port-adapter.md, spec/07-pipeline.md - adr/0003-domain-cqrs-read-write-separation.md - tutorials/{architecture-rules,cqrs-repository,functional-valueobject, specification-pattern}/... - samples/{ai-model-governance,designing-with-types,ecommerce-ddd}/... - getting-started.mdx, key-features.mdx, index.mdx, quickstart, etc. - 영/한 동시 갱신, 약 51개 파일 치환 규칙: - DomainErrors.\([A-Z]\) → Domain.\1 (대문자 시작 클래스명만 매칭하여 사용자 정의 static class 메서드 호출과 framework prefix 출력 분리) - 동일 패턴 ApplicationErrors / AdapterErrors 코드 변경 0. 검증: grep 잔존 0건. 후속 별도 작업: 일부 튜토리얼(.md 본문)은 사용자 정의 static class DomainErrors 패턴을 인용하지만 짝이 되는 .cs는 framework helper DomainError.For<T>() 패턴을 사용한다. 이 .md ↔ .cs 동기화는 본문 재작성이 필요하므로 별도 PR로 분리.
1 parent c312930 commit 496ac90

53 files changed

Lines changed: 8234 additions & 8258 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Docs.Site/src/content/docs/getting-started.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public sealed partial class Email : SimpleValueObject<string>
6666
}
6767
```
6868

69-
The `Create` method returns `Fin<Email>`. For valid input, an `Email` instance is returned; for invalid input, a structured error code (such as `DomainErrors.Email.Empty`) is returned. No exceptions are thrown.
69+
The `Create` method returns `Fin<Email>`. For valid input, an `Email` instance is returned; for invalid input, a structured error code (such as `Domain.Email.Empty`) is returned. No exceptions are thrown.
7070

7171
For detailed Value Object implementation patterns, see the [Value Objects Guide](/Functorium/guides/domain/05a-value-objects/).
7272

Docs.Site/src/content/docs/guides/adapter/12-ports.md

Lines changed: 951 additions & 951 deletions
Large diffs are not rendered by default.

Docs.Site/src/content/docs/guides/domain/04-ddd-tactical-overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -742,7 +742,7 @@ email.IfSucc(e => Console.WriteLine(e)); // user@example.com
742742
743743
// Failure
744744
var invalid = Email.Create("invalid-email");
745-
invalid.IfFail(e => Console.WriteLine(e.Code)); // DomainErrors.Email.InvalidFormat
745+
invalid.IfFail(e => Console.WriteLine(e.Code)); // Domain.Email.InvalidFormat
746746
```
747747

748748
### Test Example

Docs.Site/src/content/docs/guides/domain/05a-value-objects.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -814,7 +814,7 @@ using Functorium.Domains.ValueObjects.Validations.Contextual;
814814

815815
// Named Context validation start
816816
ValidationRules.For("ProductName").NotEmpty(name);
817-
// Error: DomainErrors.ProductName.Empty
817+
// Error: Domain.ProductName.Empty
818818
819819
// Chaining
820820
ValidationRules.For("OrderValidation")
@@ -889,12 +889,12 @@ public sealed class OrderValidation : IValidationContext;
889889
// 2. Use in ValidationRules<T> instead of a Value Object
890890
public Validation<Error, decimal> ValidatePrice(decimal price) =>
891891
ValidationRules<ProductValidation>.Positive(price);
892-
// Error Code: DomainErrors.ProductValidation.NotPositive
892+
// Error Code: Domain.ProductValidation.NotPositive
893893
894894
public Validation<Error, string> ValidateOrderId(string orderId) =>
895895
ValidationRules<OrderValidation>.NotEmpty(orderId)
896896
.ThenMinLength(10);
897-
// Error Code: DomainErrors.OrderValidation.Empty or TooShort
897+
// Error Code: Domain.OrderValidation.Empty or TooShort
898898
```
899899

900900
**Advantages:**

Docs.Site/src/content/docs/guides/domain/05b-value-objects-validation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -622,7 +622,7 @@ Used inside a Value Object class, the type is determined at compile time.
622622
// Inside the Price class
623623
public static Validation<Error, decimal> Validate(decimal value) =>
624624
ValidationRules<Price>.Positive(value);
625-
// Error code: DomainErrors.Price.NotPositive
625+
// Error code: Domain.Price.NotPositive
626626
```
627627

628628
**ValidationRules.For() gets context from a "string."**
@@ -632,7 +632,7 @@ Used when there is no Value Object (DTO validation, API input validation).
632632
```csharp
633633
// In DTO validation
634634
var result = ValidationRules.For("ProductPrice").Positive(request.Price);
635-
// Error code: DomainErrors.ProductPrice.NotPositive
635+
// Error code: Domain.ProductPrice.NotPositive
636636
```
637637

638638
**When to use which?**

Docs.Site/src/content/docs/guides/observability/19-observability-logging.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1000,7 +1000,7 @@ info: adapter event PublishTrackedEvents.PublishTrackedEvents responded success
10001000
info: adapter event PublishTrackedEvents.PublishTrackedEvents requesting with 1 events
10011001
info: application usecase.event OnProductCreated.Handle ProductCreatedEvent 01J1234567890ABCDEFGHJKMNP requesting with {@request.message}
10021002
fail: application usecase.event OnProductCreated.Handle ProductCreatedEvent 01J1234567890ABCDEFGHJKMNP responded failure in 0.0008 s with exceptional:InvalidOperationException
1003-
fail: adapter event PublishTrackedEvents.PublishTrackedEvents responded failure in 0.0309 s with 1 events with exceptional:ApplicationErrors.DomainEventPublisher.PublishFailed {@error}
1003+
fail: adapter event PublishTrackedEvents.PublishTrackedEvents responded failure in 0.0309 s with 1 events with exceptional:Application.DomainEventPublisher.PublishFailed {@error}
10041004
```
10051005

10061006
> **Note:** The `error.code` for exceptions from the Handler is the exception type name (`InvalidOperationException`), while the Publisher records a wrapped error code (`Application.DomainEventPublisher.PublishFailed`).
@@ -1011,7 +1011,7 @@ Adapter exceptions occur in the Repository, so they do not reach event publishin
10111011

10121012
```
10131013
fail: adapter repository InMemoryProductRepository.Create responded failure in 0.0005 s with exceptional:Exceptional {@error}
1014-
fail: application usecase.command CreateProductCommand.Handle responded failure in 0.0031 s with exceptional:AdapterErrors.UsecaseExceptionPipeline`2.PipelineException {@error}
1014+
fail: application usecase.command CreateProductCommand.Handle responded failure in 0.0031 s with exceptional:Adapter.UsecaseExceptionPipeline`2.PipelineException {@error}
10151015
```
10161016

10171017
### IDomainEventCtxEnricher\<TEvent\> -- Event Handler Log Enrichment

0 commit comments

Comments
 (0)