Skip to content

Case classes extending Exception have incorrect toString() #1549

@scabug

Description

@scabug
scala> case class A(s: String) extends Exception
defined class A

scala> A("foo").toString
res4: java.lang.String = A

You would expect A(foo) to be printed. If you let A extend any other class (as far as I have tested), toString behaves correctly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions