ludc
2025-01-16 986aa62ed00bee39363bab41b4eeb8259d446efd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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;
    }
}