null point exception in error catch
@@ -755,7 +755,8 @@ public class Platform {
public static ErrorCode err(Enum errCode, ErrorCode cause, String fmt, Object...args) {
ErrorFacade errf = getComponentLoader().getComponent(ErrorFacade.class);
- String details;
+ String details = null;
+ if (fmt != null) {
try {
details = String.format(fmt, args);
} catch (Exception e) {
@@ -763,6 +764,7 @@ public class Platform {
logger.warn(e.getMessage());
details = fmt;
}
+ }
ErrorCode result = errf.instantiateErrorCode(errCode, details, cause);
if (CoreGlobalProperty.ENABLE_ELABORATION) {
try {
