blob: 714b23bb6310b9ddbaa765070f56c38d15358875 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
/*******************************************************************************
* 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() {
String message = "The input model is invalid for test";
if (messageInfo != null) {
StringBuilder builder = new StringBuilder(message);
builder.append(" : ");
builder.append(messageInfo);
return builder.toString();
}
return message;
}
}
|