Class MatchException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
java.lang.MatchException
java.lang.MatchException: what a switch over patterns throws when no
case matched a value it was compiled to cover -- a sealed type or an enum
that gained a member after the switch was compiled -- or when a record's
accessor failed while a pattern took the record apart.
javac names it in the code of every exhaustive pattern switch, so the class has to exist on a device for such a switch to load at all.
-
Constructor Summary
ConstructorsConstructorDescriptionMatchException(String message, Throwable cause) A failed match, with what caused it or null. -
Method Summary
Methods inherited from class Throwable
addSuppressed, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
MatchException
-