4724e96efe
c# 异步任务里面的异常,不会在异步之外被捕获。 ``` try { Task.Run(()=>{ throw new Exception() //此异常不会被捕获 ) }; catch(Exception ex) { //将不会捕获异常 }
30 lines
458 B
C#
30 lines
458 B
C#
namespace Common;
|
|
|
|
public enum SyncMsgType
|
|
{
|
|
Error = 0,
|
|
General = 1,
|
|
Process = 2,
|
|
// DirFilePack = 3
|
|
}
|
|
|
|
public enum SyncProcessStep
|
|
{
|
|
Connect = 1,
|
|
DeployProject = 2,
|
|
DiffFileAndPack = 3,
|
|
PackSqlServer = 4,
|
|
UploadAndUnpack = 5,
|
|
Publish = 6,
|
|
Close = 7
|
|
}
|
|
|
|
public class SyncMsg
|
|
{
|
|
public SyncMsgType Type { get; set; }
|
|
|
|
public SyncProcessStep Step { get; set; }
|
|
|
|
public required string Body { get; set; }
|
|
}
|