1 package cz.cuni.amis.pogamut.sposh.exceptions;
2
3 import cz.cuni.amis.pogamut.sposh.elements.ParseException;
4 import java.text.MessageFormat;
5
6
7
8
9
10
11
12
13 public class CycleException extends ParseException {
14
15
16
17
18 public static CycleException createFromName(String name) {
19 String msg = MessageFormat.format("Adding an element with name '{0}' would cause a cycle", name);
20 return new CycleException(msg);
21 }
22
23 public CycleException(String message) {
24 super(message);
25 }
26 }