Synthia
Generic and flexible data structure generator
GiveUpException.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 
22 
23 /**
24  * An exception to throw to prevent the pick method of a {@link PickIf} picker
25  * from falling into an infinite loop.
26  * @ingroup API
27  */
28 public class GiveUpException extends PickerException
29 {
30  /**
31  * Dummy UID.
32  */
33  private static final long serialVersionUID = 1L;
34 
35  /**
36  * The default message associated to this exception.
37  */
38  private static final String m_message = "Maximum number of iterations reached. This exception was"
39  + " thrown to prevent a PickIf picker from falling into an infinite loop.";
40 
41  /**
42  * Creates a new exception with the default message.
43  */
44  public GiveUpException() { super(m_message); }
45 
46  /**
47  * Creates a new exception.
48  * @param message The message associated to this exception
49  */
50  public GiveUpException(String message) { super(message); }
51 
52  /**
53  * Creates a new exception.
54  * @param t The throwable associated to this exception
55  */
56  public GiveUpException(Throwable t) { super(t); }
57 }
ca.uqac
ca.uqac.lif.synthia
Definition: Bounded.java:19
ca.uqac.lif.synthia.PickerException
Generic runtime exception thrown by the Picker interface.
Definition: PickerException.java:26
ca.uqac.lif
ca.uqac.lif.synthia.relative.PickIf
Returns object from a picker satisfying a condition.
Definition: PickIf.java:39
ca.uqac.lif.synthia.GiveUpException.GiveUpException
GiveUpException()
Creates a new exception with the default message.
Definition: GiveUpException.java:44
ca
ca.uqac.lif.synthia.relative
Pickers that produce a value in relation to another value.
Definition: package-info.java:24
ca.uqac.lif.synthia.GiveUpException.GiveUpException
GiveUpException(Throwable t)
Creates a new exception.
Definition: GiveUpException.java:56
ca.uqac.lif.synthia.GiveUpException
An exception to throw to prevent the pick method of a PickIf picker from falling into an infinite loo...
Definition: GiveUpException.java:28
ca.uqac.lif.synthia.GiveUpException.GiveUpException
GiveUpException(String message)
Creates a new exception.
Definition: GiveUpException.java:50