Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/adr/.adr-dir
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
result-return
26 changes: 26 additions & 0 deletions doc/adr/result-return/0001-record-architecture-decisions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# 1. Record architecture decisions

Date: 2021-11-21

## Status

Accepted

## Context

We need to create modern and domain oriented result type to descrbe domains failures.
Indeed:

- Domain failures and code errors are not really the same issues.
- We need to have infrastructure logger and code.
- We need to catch the problem of having domain failures with rich expressivity without using exception.

## Decision

Create Result class that is a specialization of a monade to describe success and failures.
This class will contains a gobal logger.
This class should be build time as possible using meta programation.

## Consequences

We need to use `Result<Sucess, Failures...>` as return type of domain functions if the method can fail.