Page tree
Skip to end of metadata
Go to start of metadata
Inhalt

Verweise

 

STATUS

Fangen mehrerer Exceptions in einem Block

Java 7 and later

Multiple-exception catches are supported, starting in Java 7.

The syntax is:

The static type of ex is the most specialized common supertype of the exceptions listed. There is a nice feature where if you rethrow ex in the catch, the compiler knows that only one of the listed exceptions can be thrown.

 

Java Version in Maven setzen

Statt das Maven Plugin zu konfigurieren ist es auch möglich einfach die Java-Properties in der pom.xml zu setzen.

 

  • No labels