Skip to content

Commit

Permalink
Merge 61e19a8 into 77d9bf8
Browse files Browse the repository at this point in the history
  • Loading branch information
gmal1 committed Sep 24, 2019
2 parents 77d9bf8 + 61e19a8 commit f9607a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ Greeting.withName("Hello")
// => res0: Greeting = Hello

Greeting.withName("Haro")
// => java.lang.IllegalArgumentException: Haro is not a member of Enum (Hello, GoodBye, Hi, Bye)
// => java.lang.NoSuchElementException: Haro is not a member of Enum (Hello, GoodBye, Hi, Bye)

// A safer alternative would be to use `withNameOption(name: String)` method which returns an Option[Greeting]
Greeting.withNameOption("Hello")
Expand Down

0 comments on commit f9607a6

Please sign in to comment.