com.microfocus.awm.core

## Class TaurusToolException

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - com.microfocus.awm.core.TaurusException
      - - com.microfocus.awm.core.TaurusToolException

- All Implemented Interfaces:
    java.io.Serializable

      public class TaurusToolException
      extends TaurusException

  Exception during execution of an AWM tool.

  When thrown by an `IToolExecutor` which was executed by AWM, basic tool descriptor information will be automatically added to the detail message.

  Author:
    Micro Focus, Ulf Caspers
  See Also:
    `setToolDescriptor(ToolDescriptor)`, `IToolExecutor.execTool(com.microfocus.awm.model.IExecutionContext, ToolDescriptor, String, org.eclipse.core.runtime.IProgressMonitor)`, Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TaurusToolException(java.lang.String pMessage)` Constructs a new exception with the specified detail message.
    `TaurusToolException(java.lang.String pMessage, java.lang.Throwable pCause)` Constructs a new exception with the specified detail message and cause.
    `TaurusToolException(java.lang.String pMessage, java.lang.Throwable pCause, boolean pPreferExceptionMessage)` Constructs a new exception with the specified detail message, cause and prefer exception message flag.
    `TaurusToolException(java.lang.Throwable pCause)` Constructs a new exception with the specified cause.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `getMessage()`
    `void` | `setToolDescriptor(ToolDescriptor pToolDesc)` Sets the tool descriptor for which the exception occurred.

    - ### Methods inherited from class com.microfocus.awm.core.TaurusException

      `getCustomErrorMessage, isPreferExceptionMessage, setCustomErrorMessage, setPreferExceptionMessage`

    - ### 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

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

- - ### Constructor Detail

    - #### TaurusToolException

          public TaurusToolException(java.lang.String pMessage,
                                     java.lang.Throwable pCause,
                                     boolean pPreferExceptionMessage)

      Constructs a new exception with the specified detail message, cause and prefer exception message flag. If this flag is set to `true`, the message will be the preferred message for the AWM error dialog. Else the last message in the exception hierarchy is used as message in the error dialog.
      Parameters:
        `pMessage` - the message
        `pCause` - the original cause
        `pPreferExceptionMessage` - whether the message of this `TaurusException` should be the preferred message to be displayed in the TaurusErrorDialog.

    - #### TaurusToolException

          public TaurusToolException(java.lang.String pMessage,
                                     java.lang.Throwable pCause)

      Constructs a new exception with the specified detail message and cause.
      Parameters:
        `pMessage` - the message
        `pCause` - the original cause

    - #### TaurusToolException

          public TaurusToolException(java.lang.String pMessage)

      Constructs a new exception with the specified detail message.
      Parameters:
        `pMessage` - the message

    - #### TaurusToolException

          public TaurusToolException(java.lang.Throwable pCause)

      Constructs a new exception with the specified cause.
      Parameters:
        `pCause` - the cause

  - ### Method Detail

    - #### getMessage

          public java.lang.String getMessage()

      Overrides:
        `getMessage` in class `java.lang.Throwable`

    - #### setToolDescriptor

          public void setToolDescriptor(ToolDescriptor pToolDesc)

      Sets the tool descriptor for which the exception occurred. This will be used to add the tool descriptor's ID and tool label to the exception detail message.

      Client's don't have call this method if the tool descriptor is executed as a standard modeled AWM action, since it will be done by the `ActionExecutor`.

      Parameters:
        `pToolDesc` - the tool descriptor to set

Copyright © 2015 Micro Focus GmbH. All rights reserved.