## Defining a product status handler

The AbstractStatusHandler class and the org.eclipse.ui.statusHandlers extension point make up the generic mechanism that can be used to customize problem handling for the given product. The main purpose of this extension is to define status handlers (which extends AbstractStatusHandler) and to specify the binding between a product and a status handler. For example, the following contribution defines a hypothetical status handler to be used by the workbench:

       <extension point="org.eclipse.ui.statusHandlers">
          <statusHandler
                class="org.eclipse.ui.statushandlers.SampleStatusHandler"
                id="sampleStatusHandler"/>
          <statusHandlerProductBinding
                handlerId="sampleStatusHandler"
                productId="productId">
          </introProductBinding>
       </extension>

This contribution first defines the status handler and assigns it the id "sampleStatusHandler". It then binds this handler to a product whose id is "productId". When the status handling facility is accessed first time, the class specified in the class attribute will be instantiated by the workbench and used for handling of status or error occurred in the product.

The platform supplies its own AbstractStatusHandler implementation called WorkbenchErrorHandler.