com.szadowsz.datamuse.DatamuseException Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of datamuse4j Show documentation
Show all versions of datamuse4j Show documentation
Datamuse4J is a handler for calling the Datamuse RESTful API.
The newest version!
/**
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package com.szadowsz.datamuse;
public class DatamuseException extends Exception {
DatamuseException(String msg) {
super(msg);
}
DatamuseException(String msg, Throwable t) {
super(msg, t);
}
public static class DatamuseValException extends DatamuseException {
DatamuseValException(String msg) {
super(msg);
}
}
public static class DatamuseHttpException extends DatamuseException {
private final int code;
private final String message;
DatamuseHttpException(String msg, int code, String message) {
super(msg);
this.code = code;
this.message = message;
}
public int getCode() {
return code;
}
@Override
public String getMessage() {
return message;
}
}
}