/******************************************************************************* * Copyright (c) 2008, 2011 Obeo. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Obeo - initial API and implementation *******************************************************************************/ package org.eclipse.emf.eef.modelingBot.exception; /** * @author <a href="mailto:goulwen.lefur@obeo.fr">Goulwen Le Fur</a> */ public class InputModelInvalidException extends Exception { /** * Serialization. */ private static final long serialVersionUID = 5938605662196039272L; private String messageInfo; /** * default constructor. */ public InputModelInvalidException() { super(); } /** * constructor with info. * * @param info * the info */ public InputModelInvalidException(String info) { super(); this.messageInfo = "The input model doesn't contain enough instance of " + info + " EClass"; } /** * {@inheritDoc} * * @see java.lang.Throwable#getMessage() */ @Override public String getMessage() { final String message = "The input model is invalid for test"; if (messageInfo != null) { final StringBuilder builder = new StringBuilder(message); builder.append(" : "); builder.append(messageInfo); return builder.toString(); } return message; } }