Module jdk.incubator.concurrent
Package jdk.incubator.concurrent

# Class StructureViolationException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
jdk.incubator.concurrent.StructureViolationException

All Implemented Interfaces:
  `Serializable`

public final class StructureViolationException extends RuntimeException
Thrown when a structure violation is detected.

Since:
  19
See Also:
  - `StructuredTaskScope.close()`
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `StructureViolationException()`
  Constructs a `StructureViolationException` with no detail message.
  `StructureViolationException(String message)`
  Constructs a `StructureViolationException` with the specified detail message.

- ## Method Summary

  ### Methods declared in class java.lang.Throwable

  `addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

  ### Methods declared in class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### StructureViolationException

    public StructureViolationException()
    Constructs a `StructureViolationException` with no detail message.

  - ### StructureViolationException

    public StructureViolationException(String message)
    Constructs a `StructureViolationException` with the specified detail message.
    Parameters:
      `message` - the detail message, can be null