Skip to content

Commit 504a427

Browse files
authored
Update README.md
1 parent 5440451 commit 504a427

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

errorhandler-matchers/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,16 @@ In order to use them, provide an instance of your desired MatcherFactory when bu
88

99
ErrorHandler
1010
.create()
11-
.bindErrorCode(400, RetrofitMatcherFactory.create())
11+
.bind(400, RetrofitMatcherFactory.create())
1212
.on(400, (throwable, errorHandler) -> showErrorMessage("what?"))
1313
.handle(httpException);
1414

1515
// Or bind all integers to Retrofit errors
1616

1717
ErrorHandler
1818
.create()
19-
.bindErrorCodeClass(Range.class, RetrofitMatcherFactory.createRange())
20-
.bindErrorCodeClass(Integer.class, RetrofitMatcherFactory.create())
19+
.bindClass(Range.class, RetrofitMatcherFactory.createRange())
20+
.bindClass(Integer.class, RetrofitMatcherFactory.create())
2121
.on(400, (throwable, errorHandler) -> showErrorMessage("what?"))
2222
.on(Range.of(500, 599), (throwable, errorHandler) -> showErrorMessage("kaboom"))
2323
.handle(httpException);

0 commit comments

Comments
 (0)