package com.eactive.eai.transformer.message;

import com.eactive.eai.transformer.TransformerException;
import com.eactive.eai.transformer.layout.InvalidNodeException;

public class MessageException extends TransformerException {
	public MessageException(String msg) {
		super(msg);
	}
	
	public MessageException(Throwable cause) {
		super(cause);
	}
	
	public MessageException(String msg, Throwable cause) {
		super(msg, cause);
	}
	
	protected String dumpMessage(Message m) {
		if (m != null
			&& !(getCause() instanceof MessageSetDataException)
			&& !(getCause() instanceof InvalidAccessException)
			&& !(getCause() instanceof InvalidNodeException)) {
			return "\n" + m.toString();
		}
		return "";
	}
}
