org.apache.tools.ant
Class UnsupportedElementException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.apache.tools.ant.BuildException
                  extended by org.apache.tools.ant.UnsupportedElementException
All Implemented Interfaces:
java.io.Serializable

public class UnsupportedElementException
extends BuildException

Used to report attempts to set an unsupported element When the attempt to set the element is made, the code does not not know the name of the task/type based on a mapping from the classname to the task/type. However one class may be used by a lot of task/types. This exception may be caught by code that does know the task/type and it will reset the message to the correct message. This will be done once (in the case of a recursive call to handlechildren).

Since:
Ant 1.6.3
See Also:
Serialized Form

Constructor Summary
UnsupportedElementException(java.lang.String msg, java.lang.String element)
          Constructs an unsupported element exception.
 
Method Summary
 java.lang.String getElement()
          Get the element that is wrong.
 
Methods inherited from class org.apache.tools.ant.BuildException
getCause, getException, getLocation, printStackTrace, printStackTrace, printStackTrace, setLocation, toString
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, initCause, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UnsupportedElementException

public UnsupportedElementException(java.lang.String msg,
                                   java.lang.String element)
Constructs an unsupported element exception.

Parameters:
msg - The string containing the message.
element - The name of the incorrect element.
Method Detail

getElement

public java.lang.String getElement()
Get the element that is wrong.

Returns:
the element name.