# Class InvalidModelRuleDeclarationException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.gradle.api.GradleException
org.gradle.model.InvalidModelRuleDeclarationException

All Implemented Interfaces:
  `Serializable`

@Incubating @Deprecated public class InvalidModelRuleDeclarationException extends GradleException
Deprecated.
The Gradle software model is deprecated and will be removed in Gradle 10. Use the new component model (e.g. `cpp-application`, `cpp-library`, `swift-application`, `swift-library`, `xctest`) instead.
Thrown when a model rule, or source of model rules, is declared in an invalid way.

Since:
  2.1
See Also:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `InvalidModelRuleDeclarationException(String message)`
  Deprecated.
  Creates a new `InvalidModelRuleDeclarationException`.
  `InvalidModelRuleDeclarationException(String message, Throwable cause)`
  Deprecated.
  Creates a new `InvalidModelRuleDeclarationException`.
  `InvalidModelRuleDeclarationException(org.gradle.model.internal.core.rule.describe.ModelRuleDescriptor descriptor, String message)`
  Deprecated.
  Creates a new `InvalidModelRuleDeclarationException`.
  `InvalidModelRuleDeclarationException(org.gradle.model.internal.core.rule.describe.ModelRuleDescriptor descriptor, Throwable cause)`
  Deprecated.
  Creates a new `InvalidModelRuleDeclarationException`.

- ## Method Summary

  ### Methods inherited from class Throwable

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

  ### Methods inherited from class Object

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

- ## Constructor Details

  - ### InvalidModelRuleDeclarationException

    public InvalidModelRuleDeclarationException(String message)
    Deprecated.
    Creates a new `InvalidModelRuleDeclarationException`.
    Since:
      2.1

  - ### InvalidModelRuleDeclarationException

    public InvalidModelRuleDeclarationException(String message, Throwable cause)
    Deprecated.
    Creates a new `InvalidModelRuleDeclarationException`.
    Since:
      2.1

  - ### InvalidModelRuleDeclarationException

    public InvalidModelRuleDeclarationException(org.gradle.model.internal.core.rule.describe.ModelRuleDescriptor descriptor, Throwable cause)
    Deprecated.
    Creates a new `InvalidModelRuleDeclarationException`.
    Since:
      2.2

  - ### InvalidModelRuleDeclarationException

    public InvalidModelRuleDeclarationException(org.gradle.model.internal.core.rule.describe.ModelRuleDescriptor descriptor, String message)
    Deprecated.
    Creates a new `InvalidModelRuleDeclarationException`.
    Since:
      2.3