public class UserFriendlyRuntimeException extends RuntimeException implements UserFriendlyException
RuntimeException
that contains more detailed information for users.
It answers in understandable terms: (1) What happened (2) Where it happened (3) Why it happened, and (4) What to do to resolve the issueConstructor and Description |
---|
UserFriendlyRuntimeException(String message,
String userWhat,
String userWhere,
String userWhy,
String userHow) |
UserFriendlyRuntimeException(String message,
Throwable cause,
String userWhat,
String userWhere,
String userWhy,
String userHow) |
UserFriendlyRuntimeException(Throwable cause,
String userWhat,
String userWhere,
String userWhy,
String userHow) |
Modifier and Type | Method and Description |
---|---|
String |
getUserHow() |
String |
getUserWhat() |
String |
getUserWhere() |
String |
getUserWhy() |
String |
toString() |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
public UserFriendlyRuntimeException(String message, Throwable cause, String userWhat, String userWhere, String userWhy, String userHow)
message
- the developer messagecause
- the underlying exceptionuserWhat
- the message for the useruserWhere
- location of the exceptionuserWhy
- explanation why it happeneduserHow
- explanation how to resolve the issuepublic UserFriendlyRuntimeException(String message, String userWhat, String userWhere, String userWhy, String userHow)
message
- the developer messageuserWhat
- the message for the useruserWhere
- location of the exceptionuserWhy
- explanation why it happeneduserHow
- explanation how to resolve the issuepublic UserFriendlyRuntimeException(Throwable cause, String userWhat, String userWhere, String userWhy, String userHow)
cause
- the underlying exceptionuserWhat
- the message for the useruserWhere
- location of the exceptionuserWhy
- explanation why it happeneduserHow
- explanation how to resolve the issuepublic String getUserWhat()
getUserWhat
in interface UserFriendlyException
public String getUserWhy()
getUserWhy
in interface UserFriendlyException
public String getUserHow()
getUserHow
in interface UserFriendlyException
public String getUserWhere()
getUserWhere
in interface UserFriendlyException
Copyright © 2020–2022 Leibniz Institute for Natural Product Research and Infection Biology - Hans Knöll Institute (HKI). All rights reserved.