Skip to content

Commit

Permalink
Merge pull request #112 from J-Tech-Japan/fix-sample-code-8-in-readme
Browse files Browse the repository at this point in the history
Update README.md
  • Loading branch information
tomohisa authored Jul 30, 2024
2 parents 55769ac + 9f08562 commit 8c16bf1
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 @@ -526,35 +526,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 8c16bf1

Please sign in to comment.