class CompositeHL7v2Exception extends AbstractHL7v2Exception implements
		Iterable<AbstractHL7v2Exception> {

	@Override
	public Message populateMessage(Message m, AckTypeCode code) {
		try {
            if (MessageUtils.atLeastVersion(m, "2.5")) {
                Segment errorSegment = (Segment) m.get("ERR");
                fillErr347(errorSegment);
            } else {
                Segment msaSegment = (Segment) m.get("MSA");
                Terser.set(msaSegment, 3, 0, 1, 1, getMessage());
            }
            
            for (AbstractHL7v2Exception exception : wrapped) {
                exception.populateMessage(m, code);
            }

			return m;
		} catch (HL7Exception e) {
			// TODO Auto-generated catch block
			throw new RuntimeException(e);
		}
	}

	public  CompositeHL7v2Exception();
	public  CompositeHL7v2Exception(List<AbstractHL7v2Exception> wrapped);
	public  CompositeHL7v2Exception(AbstractHL7v2Exception[] wrapped);
	public  CompositeHL7v2Exception(String message,
			AbstractHL7v2Exception[] wrapped);
	public  CompositeHL7v2Exception(String message);
	public  CompositeHL7v2Exception(String message,
			List<AbstractHL7v2Exception> wrapped);

}