
goal.tools.errorhandling.exceptions.GOALUserError Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of runtime Show documentation
Show all versions of runtime Show documentation
A system for running GOAL multi-agent systems.
The newest version!
/**
* The GOAL Runtime Environment. Copyright (C) 2015 Koen Hindriks.
*
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
* version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see .
*/
package goal.tools.errorhandling.exceptions;
import krTools.parser.SourceInfo;
/**
* An exception that serves as a notification of the fact that we could
* not handle something that the user did. Typically, we could not parse or use
* the text he entered in a text box.
*
* This exception should never be thrown at runtime. The exception should
* only be used within {@link languageTools.program.agent} for parser and
* validation related issues and within GUI/User interaction components.
*
*
* This is not a warning that can simply always be ignored; by throwing
* this exception it is made clear that something went seriously wrong.
*
*/
public class GOALUserError extends GOALException {
/** auto-generated serial version UID */
private static final long serialVersionUID = -7825010212940544992L;
public GOALUserError(String message) {
super(message);
}
public GOALUserError(String message, SourceInfo source) {
super(message, source);
}
public GOALUserError(String message, Throwable cause) {
super(message, cause);
}
public GOALUserError(String message, Throwable cause, SourceInfo source) {
super(message, cause, source);
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("Error");
super.appendSource(builder);
builder.append(": ");
builder.append(getMessage());
return builder.toString();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy