Package: groovy.lang

## [Java] Class MissingPropertyException

- groovy.lang.MissingPropertyException

-     public class MissingPropertyException
      extends GroovyRuntimeException

  An exception occurred if a dynamic property dispatch fails with an unknown property.

  Note that the Missing*Exception classes were named for consistency and to avoid conflicts with JDK exceptions of the same name.

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `static Object` | `MPE` |

  - ### Constructor Summary

    Constructors
    Constructor and description
    `MissingPropertyException(String property, Class type)` Creates an exception for a missing property.
    `MissingPropertyException(String property, Class type, Throwable cause)` Creates an exception for a missing property with an underlying cause.
    `MissingPropertyException(String message)` Creates an exception with a custom message.
    `MissingPropertyException(String message, String property, Class type)` Creates an exception with a custom message for a missing property.

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public String` | `getMessageWithoutLocationText()` Returns the detail message without any location suffix.
    `` | `public String` | `getProperty()` Returns: the name of the property that could not be found
    `` | `public Class` | `getType()` Returns: the class which cannot answer the property

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class GroovyRuntimeException` | `getLocationText, getMessage, getMessageWithoutLocationText, getModule, getNode, setModule`

- - ### Field Detail

    - #### public static final Object MPE

  - ### Constructor Detail

    - #### public MissingPropertyException(String property, Class type)

      Creates an exception for a missing property.

      Parameters:
        `property` - the missing property name
        `type` - the target type

    - #### public MissingPropertyException(String property, Class type, Throwable cause)

      Creates an exception for a missing property with an underlying cause.

      Parameters:
        `property` - the missing property name
        `type` - the target type
        `cause` - the underlying cause

    - #### public MissingPropertyException(String message)

      Creates an exception with a custom message.

      Parameters:
        `message` - the detail message

    - #### public MissingPropertyException(String message, String property, Class type)

      Creates an exception with a custom message for a missing property.

      Parameters:
        `message` - the detail message
        `property` - the missing property name
        `type` - the target type

  - ### Method Detail

    - #### public String getMessageWithoutLocationText()

      Returns the detail message without any location suffix.

      Returns:
        the formatted detail message

    - #### public String getProperty()

      Returns:
        the name of the property that could not be found

    - #### public Class getType()

      Returns:
        the class which cannot answer the property