mirror of
https://gitee.com/BDWare/cm
synced 2025-01-10 01:44:04 +00:00
update for error log
This commit is contained in:
parent
bc5dd8a106
commit
487697aa87
@ -32,6 +32,8 @@ import org.zz.gmhelper.SM2KeyPair;
|
||||
import org.zz.gmhelper.SM2Util;
|
||||
|
||||
import java.io.*;
|
||||
import java.lang.reflect.Method;
|
||||
import java.lang.reflect.Parameter;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.*;
|
||||
@ -878,14 +880,15 @@ public class ContractManager {
|
||||
initLoadMemory(client);
|
||||
statusRecorder.createContract(client);
|
||||
loadProjectConfig(client);
|
||||
|
||||
return ret;
|
||||
default:
|
||||
return "contract manager can't support:" + c.getType();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
statusRecorder.killContract(c.getID());
|
||||
r = new ContractResult(Status.Error, new JsonPrimitive("exception occurs: " + e.getMessage()));
|
||||
ByteArrayOutputStream bo = new ByteArrayOutputStream();
|
||||
e.printStackTrace(new PrintStream(bo));
|
||||
r = new ContractResult(Status.Error, new JsonPrimitive(bo.toString()));
|
||||
return JsonUtil.toJson(r);
|
||||
}
|
||||
}
|
||||
|
@ -1,10 +1,16 @@
|
||||
package org.bdware.sc.test;
|
||||
|
||||
import org.bdware.sc.ContractManager;
|
||||
import org.bdware.sc.bean.Contract;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.lang.reflect.Parameter;
|
||||
|
||||
public class ContractManagerTest {
|
||||
public static void main(String[] args) {
|
||||
ContractManager.yjsPath = "./generatedlib/yjs.jar";
|
||||
ContractManager.instance = new ContractManager();
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user