Package org.apache.sling.models.validation

## Class InvalidResourceException

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - java.lang.RuntimeException
      - - org.apache.sling.models.factory.InvalidModelException
        - - org.apache.sling.models.validation.InvalidResourceException

All Implemented Interfaces:
  `Serializable`

    @ProviderType
    public final class InvalidResourceException
    extends org.apache.sling.models.factory.InvalidModelException

Exception embedding a `ValidationResult` from Sling Validation.

See Also:
  Serialized Form

### Constructor Summary

Constructors
`InvalidResourceException​(String message, org.apache.sling.validation.ValidationResult result, String path)`

### Method Summary

All Methods Instance Methods Concrete Methods
`String` `getMessage()`
`String` `getPath()`
`org.apache.sling.validation.ValidationResult` `getResult()`

### Methods inherited from class java.lang.Throwable

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

### Methods inherited from class java.lang.Object

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

### Constructor Detail

#### InvalidResourceException

    public InvalidResourceException​(String message,
                                    org.apache.sling.validation.ValidationResult result,
                                    String path)

### Method Detail

#### getResult

    public org.apache.sling.validation.ValidationResult getResult()

Returns:
  the underlying `ValidationResult`

#### getPath

    public String getPath()

Returns:
  the path of the resource which was considered invalid

#### getMessage

    public String getMessage()

Overrides:
  `getMessage` in class `Throwable`