APIdia Launch Partner
Top Description Fields Constructors
java.util.concurrent

public final Class StructureViolationException

extends RuntimeException
Class Inheritance
Annotations
@PreviewFeature
feature:STRUCTURED_CONCURRENCY
Imports
jdk.internal.javac.PreviewFeature

Preview

Seventh Preview of Structured Concurrency (JEP 533).

Programs can only use StructureViolationException when preview features are enabled.
Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.

Thrown when a structure violation is detected.
Since
21
See Also
StructuredTaskScope#close()

Field Summary

Modifier and TypeField and Description
private static final long

Constructor Summary

AccessConstructor and Description
public
StructureViolationException()

Constructs a StructureViolationException with no detail message.

public
StructureViolationException(String
the detail message, can be null
message
)

Constructs a StructureViolationException with the specified detail message.

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides java.lang.RuntimeException.serialVersionUID.

Annotations
@Serial

Constructor Detail

StructureViolationExceptionback to summary
public StructureViolationException()

Constructs a StructureViolationException with no detail message.

StructureViolationExceptionback to summary
public StructureViolationException(String message)

Constructs a StructureViolationException with the specified detail message.

Parameters
message:String

the detail message, can be null