Skip to content

Commit

Permalink
Added regex pattern for class cast exception to match openjdk. Re: #137
Browse files Browse the repository at this point in the history
  • Loading branch information
elenam committed May 20, 2021
1 parent 83b833d commit 9391e32
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/errors/error_dictionary.clj
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@
(get-type (nth matches 2)) ", but "
(get-type (nth matches 1)) " was given instead.\n"))}

;; Class cast exception phrasing in openjdk:
{:key :class-cast-exception-with-class
:class "ClassCastException"
:match (beginandend "class (\\S*) cannot be cast to class (\\S*)")
:fn (fn [matches] (str "Expected "
(get-type (nth matches 2)) ", but "
(get-type (nth matches 1)) " was given instead.\n"))}

;###################################
;### Illegal Argument Exceptions ###
;###################################
Expand Down

0 comments on commit 9391e32

Please sign in to comment.