public TargettedMessage(String messagecode, Object[] args, Exception exception) { updateMessageCode(messagecode); this.args = args; this.exception = exception; }
/** Construct a simple targetted message * @param messagecode The message key for resolving the message text. * @param targetid The target field or path of the message, if <code>null</code> * will be substituted with {@link #TARGET_NONE}. */ public TargettedMessage(String messagecode, String targetid) { updateMessageCode(messagecode); this.targetid = targetid == null ? TARGET_NONE : targetid; }
public TargettedMessage(String messagecode, Object[] args, int severity) { updateMessageCode(messagecode); this.args = args; this.severity = severity; }
public TargettedMessage(String messagecode, Object[] args) { updateMessageCode(messagecode); this.args = args; }
public TargettedMessage(String messagecode, Exception exception) { updateMessageCode(messagecode); this.exception = exception; }
protected void handleRawException(TargettedMessage message) { message.updateMessageCode(CoreMessages.GENERAL_ACTION_ERROR); }
public TargettedMessage(String messagecode) { updateMessageCode(messagecode); }
public TargettedMessage(String messagecode, Exception exception, String targetid) { updateMessageCode(messagecode); updateTarget(targetid); this.exception = exception; }
public TargettedMessage(String messagecode, Object[] args, String targetid) { updateMessageCode(messagecode); updateTarget(targetid); this.args = args; }
public TargettedMessage(String messagecode, Object[] args, Exception exception, String targetid) { updateMessageCode(messagecode); updateTarget(targetid); this.args = args; this.exception = exception; }
public Object handleError(String returncode, Exception exception, String flowstate, String viewID, TargettedMessage message) { if ((this.returncode == null || this.returncode.equals(returncode)) && (this.exceptionclass == null || exceptionclass.isInstance(exception)) && (this.flowstate == null || this.flowstate.equals(flowstate)) && (this.viewID == null || this.viewID.equals(viewID))) { if (messagekey != null) { message.updateMessageCode(messagekey); if (messagetarget != null) { message.targetid = messagetarget; } if (exception != null) { if (propagateexception) { throw UniversalRuntimeException.accumulate(exception); } else { Logger.log.warn("Error invoking action", exception); } } } return newreturncode == null? returncode : newreturncode; } return null; }
public String processMessage(TargettedMessage message, String target) { if (message.messagecodes.length == 1 && message.messagecodes[0].equals(CoreMessages.RAW_EXCEPTION_PLACEHOLDER) && message.exception != null) { String emess = UniversalRuntimeException.unwrapException(message.exception).getMessage(); if (emess == null) { emess = ""; } int delimpos = emess.indexOf(messageDelimiter); if (delimpos == -1) { handleRawException(message); } else { String key = emess.substring(delimpos + messageDelimiter.length()); message.updateMessageCode(key); } } return null; }