No matching parent execution for error code followup.email.error found

While throwing a exception from the execute method of service task, I am getting “No matching parent execution for error code followup.email.error found”. Even though I have defined error handling in the xml and follwing error handling service task.

<boundaryEvent id=“boundaryerror1” name=“emailBoundaryError” attachedToRef=“emailsubprocess”>
<errorEventDefinition errorRef=“followup.email.error”></errorEventDefinition>
</boundaryEvent>
<sequenceFlow id=“flow76” sourceRef=“boundaryerror1” targetRef=“errorHandlerServiceTask”></sequenceFlow>

Code Snippet:
@Override
public void execute( final DelegateExecution execution ) {
try {
//throw exception
} catch ( final Exception e ) {
runtimeService.setVariable( execution.getId(), “errorlogging”, e );
throw new BpmnError( “followup.email.error”, “followup email error detail” );
}
}

That should work indeed. Can you paste your full process definition? Did you define the error at the process instance level?