
org.cinchapi.quest.util.Exceptions Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of quest-api Show documentation
Show all versions of quest-api Show documentation
Quest is a JVM framework for quickly defining both api endpoints and view controllers in a web application
The newest version!
package org.cinchapi.quest.util;
import com.google.common.base.Strings;
/**
* Utility class for handling Exceptions.
*
* @author jnelson
*/
public class Exceptions {
/**
* Reliably get a message that describes the {@code exception}.
*
* @param e
* @return the Exception message
*/
public static String getMessage(Exception exception) {
String message = exception.getMessage();
if(Strings.isNullOrEmpty(message)) {
message = exception.getClass().getSimpleName();
}
return message;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy