Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
MOTOO11 committed Jul 30, 2024
1 parent 55ac88c commit 9f08562
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -536,35 +536,35 @@ internal class Program
// IncrementWithThrowing and TripleWithThrowing can throw exceptions
// WrapTry is used to catch exceptions and return them as error
// Calculate (1 + 1) * 2 * 3 = 12
// Value1: 12
ResultBox<int>.WrapTry(() => IncrementWithThrowing(1))
// Value: 12
ResultBox.WrapTry(() => IncrementWithThrowing(1))
.Conveyor(Double)
.ConveyorWrapTry(TripleWithThrowing)
.Log();

// IncrementWithThrowing and TripleWithThrowing can throw exceptions
// WrapTry is used to catch exceptions and return them as error
// Error2: System.ApplicationException: 2000 is not allowed for Increment
ResultBox<int>.WrapTry(() => IncrementWithThrowing(2000))
// Error: 2000 is not allowed for Increment
ResultBox.WrapTry(() => IncrementWithThrowing(2000))
.Conveyor(Double)
.ConveyorWrapTry(TripleWithThrowing)
.Log();

// IncrementWithThrowing and TripleWithThrowing can throw exceptions
// WrapTry is used to catch exceptions and return them as error
// Error3: System.ApplicationException: 1001 is not allowed for Double
ResultBox<int>.WrapTry(() => IncrementWithThrowing(1000))
// Error: 1001 is not allowed for Double
ResultBox.WrapTry(() => IncrementWithThrowing(1000))
.Conveyor(Double)
.ConveyorWrapTry(TripleWithThrowing)
.Log();

// IncrementWithThrowing and TripleWithThrowing can throw exceptions
// WrapTry is used to catch exceptions and return them as error
// Error4: System.ApplicationException: 1202 is not allowed for Triple
ResultBox<int>.WrapTry(() => IncrementWithThrowing(600))
// Error: 1202 is not allowed for Triple
ResultBox.WrapTry(() => IncrementWithThrowing(600))
.Conveyor(Double)
.ConveyorWrapTry(TripleWithThrowing)
.Log();
}
}
```
```

0 comments on commit 9f08562

Please sign in to comment.