public class FormsPortalException extends Exception
Constructor and Description |
---|
FormsPortalException() |
FormsPortalException(String code) |
FormsPortalException(String code,
Object[] args) |
FormsPortalException(String code,
Throwable cause) |
FormsPortalException(String code,
Throwable cause,
Object[] args) |
FormsPortalException(Throwable cause) |
Modifier and Type | Method and Description |
---|---|
protected String |
fastFormat(String msg,
Object[] args)
Fast message formatter.
|
String |
getCode() |
String |
getMessage() |
Object[] |
getMessageArgs() |
void |
setCode(String code) |
void |
setMessageArgs(Object[] messageArgs) |
public FormsPortalException()
public FormsPortalException(String code)
public FormsPortalException(Throwable cause)
public String getCode()
public void setCode(String code)
public String getMessage()
getMessage
in class Throwable
public Object[] getMessageArgs()
public void setMessageArgs(Object[] messageArgs)
protected String fastFormat(String msg, Object[] args)
MessageFormat first compiles the message into a state machine, and then applies it. That's faster if you use the message format over and over, but calling the static method MessageFormat.format constructs a MessageFormat, uses it once and then throws it away. That's really expensive.
This routine is almost 10 times faster that MessageFormat.format for simple "{n}"-style arguments which are typical. For the more complicated cases, it just delegates to MessageFormat.format.
msg
- the messageargs
- the argumentsCopyright © 1982–2023 Adobe Systems Incorporated. All rights reserved.