/** * Constructs a new exception with the specified reason set as its detail message and appended to * the message key. * * @param reason the reason */ public ServiceCompatibilityException(Reason reason) { super(reason.toString()); setMessageKey(getMessageKey() + "." + reason.toString()); bean.setReason(reason); }
/** * Constructs a new exception with the given detail message and message parameters, and appends * the specified reason to the message key. * * @param message the detail message * @param params the message parameters * @param reason the reason */ public ServiceCompatibilityException(String message, Object[] params, Reason reason) { super(message, params); setMessageKey(getMessageKey() + "." + reason.toString()); bean.setReason(reason); }
/** * Returns the reason for this exception. * * @return the reason */ public Reason getReason() { return bean.getReason(); }