Content Pipeline Guide > Error Handling > Customizing Error Handling > Adding an Error Handler to a CCF File
  
Adding an Error Handler to a CCF File
You must add the error handler filter definition to the CCF's Resource element, and specify the error handler as an attribute of the Pipeline element.
The following example illustrates how to replace the default error handler with your custom error handler. The Resource element defines the simpleErrorHandler filter.
<Resource>
....
<FilterDef id="simpleErrorHandler"
adapterClass=
"com.arbortext.epic.saxfilter.DefaultFilterAdapter"
filterClass=
"com.arbortext.epic.saxfilter.SimpleErrorHandler"
type="sink">
<Label>Simple Error Handler</Label>
<Documentation> This filter reports error message to
the console.
</Documentation>
</FilterDef>
....
</Resource>
The Pipeline element specifies the errorHandler attribute, which refers to the simple_error_handler. The simple_error_handler is then associated with the simpleErrorHandler defined by the Resource element.
<Pipeline startFilters="epic_generator"
errorHandler="simple_error_handler">
...
<Filter id="simple_error_handler"
filterDefRef="simpleErrorHandler"/>
...
</Pipeline>
This error handler serves as the embedded error handler and reports messages for publishing processes defined by the CCF file. Messages reported by calling log4j methods directly are not affected by the new error handler.