Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
steden committed Oct 6, 2023
1 parent be240e2 commit 5de7c8a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions exception/expamle_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package exception
import "github.com/farseer-go/fs/flog"

func ExampleTry() {
try := exception.Try(func() {
try := Try(func() {
// 这里我们使用一个异常
exception.ThrowRefuseException("test is throw")
ThrowRefuseException("test is throw")
})

// 不会运行
Expand All @@ -14,7 +14,7 @@ func ExampleTry() {
})

// 会运行
try.CatchRefuseException(func(exp exception.RefuseException) {
try.CatchRefuseException(func(exp RefuseException) {
flog.Warning(exp.Message)
})

Expand Down

0 comments on commit 5de7c8a

Please sign in to comment.