Skip to content

Commit

Permalink
output message of warning message for aggregate without entity
Browse files Browse the repository at this point in the history
  • Loading branch information
sunwei committed Nov 29, 2023
1 parent 4c21dff commit bf33c48
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions internal/domain/arch/entity/arch.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ func (arc *Arch) buildStrategicArchGraph() (*Diagram, error) {
return nil, err
}
if a.Entity == nil {
return nil, fmt.Errorf("aggregate %s has no entity", a.Name)
fmt.Printf("warn: strategic aggregate %s has no entity", a.Name)
continue
}

if err := g.AddObjTo(a, g.Name(), arch.RelationTypeAggregationRoot); err != nil {
Expand Down Expand Up @@ -169,7 +170,8 @@ func (arc *Arch) buildTacticArchGraph() (*Diagram, error) {
return nil, err
}
if a.Entity == nil {
return nil, fmt.Errorf("aggregate %s has no entity", a.Name)
fmt.Printf("warn: tactic aggregate %s has no entity", a.Name)
continue
}
if err := dm.addAggregateToDiagram(g, ag, a); err != nil {
return nil, err
Expand Down
2 changes: 1 addition & 1 deletion internal/interfaces/cmd/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ func getBuildInfo() *buildInfo {
var CurrentVersion = Version{
Major: 0,
Minor: 4,
PatchLevel: 0,
PatchLevel: 1,
Suffix: "",
}

Expand Down

0 comments on commit bf33c48

Please sign in to comment.