
org.infobip.mobile.messaging.api.support.ApiIOException Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of infobip-mobile-messaging-api-java Show documentation
Show all versions of infobip-mobile-messaging-api-java Show documentation
Mobile Messaging SDK for Android
The newest version!
package org.infobip.mobile.messaging.api.support;
import org.infobip.mobile.messaging.api.support.util.StringUtils;
/**
* @author mstipanov
* @since 17.03.2016.
*/
public class ApiIOException extends RuntimeException {
private final String code;
public ApiIOException(String code, String message) {
super(message);
this.code = code;
}
public ApiIOException(String code, String message, Throwable cause) {
super(message, cause);
this.code = code;
}
public String getCode() {
return code;
}
public String toString() {
String s = getClass().getName();
String message = getLocalizedMessage();
String code = getCode();
if (StringUtils.isNotBlank(code)) {
if (StringUtils.isNotBlank(message)) {
message = code + ", "+ message;
} else {
message = code;
}
}
return (message != null) ? (s + ": " + message) : s;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy