package com.vci.server.workflow.server;
|
|
|
import com.vci.common.exception.VciExceptionTool;
|
import com.vci.corba.common.VCIError;
|
import com.vci.server.base.exception.ExceptionLocalHandler;
|
|
public class ServerErrorTool {
|
public static VCIError getVCIError(String key, Throwable e){
|
VCIError error = null;
|
if (e == null) {
|
error = new VCIError(key, new String[0]);
|
} else if (e instanceof VCIError) {
|
error = (VCIError) e;
|
} else {
|
error = new VCIError(key, new String[]{VciExceptionTool.getExceptionStr(e), VciExceptionTool.getExceptionDetail(e)});
|
}
|
VCIError rsError = ExceptionLocalHandler.getInstance().getLocalString(error, "RMIPWorkflow");
|
return rsError;
|
}
|
}
|