Skip to content

Commit

Permalink
[apoc] Weaken type restriction in readapt.
Browse files Browse the repository at this point in the history
  • Loading branch information
fehu committed Jul 28, 2020
1 parent 9613a16 commit 2a8909f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ object ApocException {
def adapt: PartialFunction[Throwable, ApocException] =
readapt{ case err => new ApocException(err) }

def readapt[E <: Exception](pf : PartialFunction[String, E]): PartialFunction[Throwable, E] = {
def readapt[E <: Throwable](pf : PartialFunction[String, E]): PartialFunction[Throwable, E] = {
val readapt0: PartialFunction[Throwable, String] = {
case ce: ClientException if ce.getMessage matches regex =>
regex.r.findFirstMatchIn(ce.getMessage).get.group(1)
Expand Down

0 comments on commit 2a8909f

Please sign in to comment.