Synthia
Generic and flexible data structure generator
CannotShrinkException.java
Go to the documentation of this file.
1 /*
2  Synthia, a data structure generator
3  Copyright (C) 2019-2021 Laboratoire d'informatique formelle
4  Université du Québec à Chicoutimi, Canada
5 
6  This program is free software: you can redistribute it and/or modify
7  it under the terms of the GNU Lesser General Public License as published
8  by the Free Software Foundation, either version 3 of the License, or
9  (at your option) any later version.
10 
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU Lesser General Public License for more details.
15 
16  You should have received a copy of the GNU Lesser General Public License
17  along with this program. If not, see <http://www.gnu.org/licenses/>.
18  */
19 package ca.uqac.lif.synthia;
20 
21 /**
22  * An exception to throw when a picker can't pick an other element.
23  * @ingroup API
24  */
26 {
27  /**
28  * Dummy UID.
29  */
30  private static final long serialVersionUID = 1L;
31 
32  /**
33  * The default message associated to this exception.
34  */
35  private static final String m_message = "This picker is not shrinkable";
36 
37  /**
38  * Creates a new exception.
39  * @param picker The picker instance that cannot be shrunk
40  */
42  {
43  super(m_message + ": " + picker.getClass().getSimpleName());
44  }
45 
46  /**
47  * Creates a new exception.
48  * @param message The message associated to this exception
49  */
50  public CannotShrinkException(String message)
51  {
52  super(message);
53  }
54 
55  /**
56  * Creates a new exception.
57  * @param t The throwable associated to this exception
58  */
59  public CannotShrinkException(Throwable t)
60  {
61  super(t);
62  }
63 }
ca.uqac.lif.synthia.Picker<?>
ca.uqac.lif.synthia.CannotShrinkException.CannotShrinkException
CannotShrinkException(String message)
Creates a new exception.
Definition: CannotShrinkException.java:50
ca.uqac.lif.synthia.CannotShrinkException.CannotShrinkException
CannotShrinkException(Throwable t)
Creates a new exception.
Definition: CannotShrinkException.java:59
ca.uqac.lif.synthia.PickerException
Generic runtime exception thrown by the Picker interface.
Definition: PickerException.java:26
ca.uqac.lif.synthia.CannotShrinkException.CannotShrinkException
CannotShrinkException(Picker<?> picker)
Creates a new exception.
Definition: CannotShrinkException.java:41
ca.uqac.lif.synthia.CannotShrinkException
An exception to throw when a picker can't pick an other element.
Definition: CannotShrinkException.java:25