本文整理汇总了C#中Library.ErrorMsg类的典型用法代码示例。如果您正苦于以下问题:C# ErrorMsg类的具体用法?C# ErrorMsg怎么用?C# ErrorMsg使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ErrorMsg类属于Library命名空间,在下文中一共展示了ErrorMsg类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: start
public override void start()
{
try
{
try
{
Variable.sServerIp = ReadDataFromXml.AppIp;
Variable.sPort = ReadDataFromXml.AppPort;
Variable.sUserId = ReadDataFromXml.AppUser;
Variable.sPassword = ReadDataFromXml.AppPwd;
this.execConnection();
}
catch (Exception exception1)
{
Exception exception = exception1;
ErrorMsg errorMsg = new ErrorMsg("ChkErrorTimer", "start", string.Concat("启动故障检测失败", exception.Message));
this.logHelper.WriteError(errorMsg);
}
this.tChkErrorTimer = new System.Timers.Timer((double)this.iChkErrTime);
this.tChkErrorTimer.Elapsed += new ElapsedEventHandler(this.onChkErrorMain);
this.tChkErrorTimer.Enabled = true;
}
catch (Exception exception3)
{
Exception exception2 = exception3;
this.tChkErrorTimer.Enabled = true;
ErrorMsg errorMsg1 = new ErrorMsg("ChkErrorTimer", "start", string.Concat("启动故障检测失败Ex", exception2.Message));
this.logHelper.WriteError(errorMsg1);
}
}
示例2: Add
public override void Add(DataTable data)
{
if ((data != null) && (data.Rows.Count > 0))
{
GpsDataTable table = new GpsDataTable(UpdataStruct.ColNameList);
try
{
int num = 1;
for (int i = 0; i <= (data.Rows.Count - 1); i++)
{
table.InsertRows(data.Rows[i].ItemArray);
if ((num >= base._Size) || (i == (data.Rows.Count - 1)))
{
lock (base._PosList.SyncRoot)
{
base._PosList.Add(CompressHelper.CompressToSelf(table));
}
table.Rows.Clear();
num = 0;
}
num++;
}
}
catch (Exception exception)
{
ErrorMsg msg = new ErrorMsg("RemotingDataBS", "Add", exception.Message + exception.StackTrace);
new LogHelper().WriteError(msg);
base._PosList = new ArrayList(100);
}
}
}
示例3: start
public override void start()
{
try
{
this.tUpdateRemedyBillTimer = new Timer((double)this.iGetBillPosInterval);
this.tUpdateRemedyBillTimer.Elapsed += new ElapsedEventHandler(this.UpdateRemedyBill_Elapsed);
this.tUpdateRemedyBillTimer.Enabled = true;
}
catch (Exception exception1)
{
Exception exception = exception1;
this.tUpdateRemedyBillTimer.Enabled = true;
ErrorMsg errorMsg = new ErrorMsg("AddressResolution", "start", string.Concat("定时补救订单", exception.Message));
this.logHelper.WriteError(errorMsg);
}
try
{
this.tGetCarDayPos = new Timer((double)this.iGetCarDayPosInterval);
this.tGetCarDayPos.Elapsed += new ElapsedEventHandler(this.tGetCarDayPos_Elapsed);
this.tGetCarDayPos.Enabled = true;
}
catch (Exception exception3)
{
Exception exception2 = exception3;
this.tGetCarDayPos.Enabled = true;
ErrorMsg errorMsg1 = new ErrorMsg("AddressResolution", "start", string.Concat("车辆当天末次位置", exception2.Message));
this.logHelper.WriteError(errorMsg1);
}
}
示例4: execSaveGpsLogTable
public static void execSaveGpsLogTable(int sWrkId, int sOrderId, string sCarId, int sOptcode, string sMsgText)
{
string str = sMsgText.Replace("'", "‘");
string str1 = "";
try
{
str1 = string.Concat(str1, " insert into ");
str1 = string.Concat(str1, " GpsLog(wrkid,orderid,userid,carid,optcode,OptCodeDetail,isSuccess,description,optTime) ");
str1 = string.Concat(str1, " values({0},{1},'{2}',{3}, 13, {4},-1,'{5}',getDate())");
object[] objArray = new object[] { sWrkId, sOrderId, ReadDataFromXml.ExecUserId, sCarId, sOptcode, str };
str1 = string.Format(str1, objArray);
SqlDataAccess.insertBySql(str1);
}
catch (Exception exception1)
{
Exception exception = exception1;
ErrorMsg errorMsg = new ErrorMsg()
{
ClassName = "ReadDataFromDB",
FunctionName = "execSaveGpsLogTable",
ErrorText = string.Concat("保存下发内容到GpsLog时发生错误!", exception.Message, ",SQL:", str1)
};
(new LogHelper()).WriteError(errorMsg, exception);
}
}
示例5: start
public override void start()
{
try
{
this.tBroadCastTimer = new Timer((double)this.iBroadCastTime);
this.tBroadCastTimer.Elapsed += new ElapsedEventHandler(this.tBroadCastTimer_Elapsed);
this.tBroadCastTimer.Enabled = true;
this.tBroadCastTimer.Start();
}
catch (Exception exception1)
{
Exception exception = exception1;
ErrorMsg errorMsg = new ErrorMsg("Service", "GpsPicMain", string.Concat("启动播报普通信息失败", exception.Message));
this.logHelper.WriteError(errorMsg);
}
try
{
this.tBroadCastUrgentTimer = new Timer((double)this.iBroadCastTime);
this.tBroadCastUrgentTimer.Elapsed += new ElapsedEventHandler(this.tBroadCastUrgentTimer_Elapsed);
this.tBroadCastUrgentTimer.Enabled = true;
this.tBroadCastUrgentTimer.Start();
}
catch (Exception exception3)
{
Exception exception2 = exception3;
ErrorMsg errorMsg1 = new ErrorMsg("Service", "GpsPicMain", string.Concat("启动播报紧急信息失败", exception2.Message));
this.logHelper.WriteError(errorMsg1);
}
}
示例6: method_0
private void method_0(Exception exception_0)
{
Thread.Sleep(0x1388);
LogHelper helper = new LogHelper();
ErrorMsg msg = new ErrorMsg("UpDataOtherData", helper.GetCallFunction(), helper.GetExceptionMsg(exception_0));
helper.WriteError(msg);
}
示例7: start
public override void start()
{
try
{
this.tGetConfigInfo = new Timer(100);
this.tGetConfigInfo.Elapsed += new ElapsedEventHandler(this.tGetConfigInfo_Elapsed);
this.tGetConfigInfo.Enabled = true;
}
catch (Exception exception1)
{
Exception exception = exception1;
ErrorMsg errorMsg = new ErrorMsg("CarInOutOfRangeOnTime", "start", string.Concat("开启获取按时进出站配置信息错误,", exception.Message));
this.logHelper.WriteError(errorMsg);
}
try
{
this.tGetCurrentPosInfo = new Timer((double)this.iGetCurrentPosInfo);
this.tGetCurrentPosInfo.Elapsed += new ElapsedEventHandler(this.tGetCurrentPosInfo_Elapsed);
this.tGetCurrentPosInfo.Enabled = true;
}
catch (Exception exception3)
{
Exception exception2 = exception3;
ErrorMsg errorMsg1 = new ErrorMsg("CarInOutOfRangeOnTime", "start", string.Concat("开启检测是否按时进出站错误,", exception2.Message));
this.logHelper.WriteError(errorMsg1);
}
}
示例8: DeleteOldRecord
public void DeleteOldRecord(int iLogSaveDate)
{
try
{
DirectoryInfo info = new DirectoryInfo(FileHelper.FilePath);
if (!info.Exists)
{
return;
}
foreach (FileInfo info2 in info.GetFiles())
{
if (info2.CreationTime.AddDays((double) iLogSaveDate).Date < DateTime.Now.Date)
{
File.Delete(info2.FullName);
}
}
}
catch (Exception exception)
{
ErrorMsg pErrorMsg = new ErrorMsg("LogHelper", "清除旧日志文件", exception.Message);
new LogHelper().WriteError(pErrorMsg);
return;
}
LogMsg pLogMsg = new LogMsg("LogHelper", "清除旧日志文件", "成功");
new LogHelper().WriteLog(pLogMsg);
}
示例9: method_0
private void method_0()
{
Trace.Write("appserver - Thread upNewPosition, WebGpsClient_GetCurrentPosData start!");
DataRow row = UpdataStruct.CloneDataTableColumn.NewRow();
SqlDataAccess access = new SqlDataAccess();
DateTime dbTime = base.GetDbTime(access);
Label_0019:
try
{
SqlParameter[] parameterArray = new SqlParameter[] { new SqlParameter("@ReadTime", dbTime) };
DataTable table = access.getDataBySP("WebGpsClient_GetCurrentPosData", parameterArray);
if (table != null)
{
goto Label_0056;
}
Label_004A:
Thread.Sleep(0x7d0);
goto Label_0019;
Label_0056:
if (table.Rows.Count <= 0)
{
goto Label_004A;
}
dbTime = Convert.ToDateTime(table.Rows[0]["svrTime"]);
string str = string.Empty;
string str2 = string.Empty;
CarInfo dataCarInfoBySimNum = null;
CarPartInfo info2 = new CarPartInfo();
foreach (DataRow row2 in table.Rows)
{
this.method_1(row2, row, info2);
str = Convert.ToString(row2["phone"]);
str2 = Convert.ToString(row2["carNum"]);
dataCarInfoBySimNum = CarDataInfoBuffer.GetDataCarInfoBySimNum(str);
if (((dataCarInfoBySimNum != null) && !string.IsNullOrEmpty(str2)) && !str2.Equals(dataCarInfoBySimNum.CarNum))
{
CarDataInfoBuffer.GetDataCarInfoByCarNum(str2);
}
if (dataCarInfoBySimNum != null)
{
dataCarInfoBySimNum.CarPosData = row.ItemArray;
dataCarInfoBySimNum.IsNewPosTime = dbTime;
}
}
Thread.Sleep(20);
goto Label_0019;
}
catch (Exception exception)
{
Thread.Sleep(0xbb8);
LogHelper helper = new LogHelper();
ErrorMsg msg = new ErrorMsg("UpdataNewPosition", helper.GetCallFunction(), helper.GetExceptionMsg(exception));
helper.WriteError(msg);
goto Label_0019;
}
}
示例10: start
public override void start()
{
try
{
this.tTimer1 = new Timer(1000);
this.tTimer1.Elapsed += new ElapsedEventHandler(this.tTimer1_Elapsed);
this.tTimer1.Enabled = true;
}
catch (Exception exception1)
{
Exception exception = exception1;
ErrorMsg errorMsg = new ErrorMsg("SendPZMessage", "start", string.Concat(",", exception.Message));
this.logHelper.WriteError(errorMsg);
}
}
示例11: start
public override void start()
{
try
{
this.tTerminalDemand = new Timer((double)this.iTerminalDemand);
this.tTerminalDemand.Elapsed += new ElapsedEventHandler(this.tTerminalDemand_Elapsed);
this.tTerminalDemand.Enabled = true;
}
catch (Exception exception1)
{
Exception exception = exception1;
ErrorMsg errorMsg = new ErrorMsg("JTBTerminalDemand", "start", string.Concat("启动定时下发终端点播失败", exception.Message));
this.logHelper.WriteError(errorMsg);
}
}
示例12: start
public override void start()
{
try
{
this.tCheckRoadSpeedAndRan = new Timer(1000);
this.tCheckRoadSpeedAndRan.Elapsed += new ElapsedEventHandler(this.tCheckRoadSpeedAndRan_Elapsed);
this.tCheckRoadSpeedAndRan.Enabled = true;
}
catch (Exception exception1)
{
Exception exception = exception1;
ErrorMsg errorMsg = new ErrorMsg("PlatFormCheckRoadSpeedAndRank", "start", string.Concat("判断车自定义分段超速报警和道路等级,", exception.Message));
this.logHelper.WriteError(errorMsg);
}
}
示例13: start
public override void start()
{
try
{
this.tCheckSeparateSticky = new Timer((double)this.SeparateAndStickyInterval);
this.tCheckSeparateSticky.Elapsed += new ElapsedEventHandler(this.tCheckSeparateSticky_Elapsed);
this.tCheckSeparateSticky.Enabled = true;
}
catch (Exception exception1)
{
Exception exception = exception1;
ErrorMsg errorMsg = new ErrorMsg("SeparateAndSticky", "start", string.Concat("开启检测脱车粘车报警错误,", exception.Message));
this.logHelper.WriteError(errorMsg);
}
}
示例14: start
public override void start()
{
try
{
this.tCheckPathAlarm = new Timer((double)this.iCheckPathAlarm);
this.tCheckPathAlarm.Elapsed += new ElapsedEventHandler(this.tCheckPathAlarm_Elapsed);
this.tCheckPathAlarm.Enabled = true;
}
catch (Exception exception1)
{
Exception exception = exception1;
ErrorMsg errorMsg = new ErrorMsg("PlatformAlarmPathAlarm", "start", string.Concat("开启检测偏移路线报警错误,", exception.Message));
this.logHelper.WriteError(errorMsg);
}
}
示例15: start
public override void start()
{
try
{
this.tSendCurrentAddress = new Timer(10000);
this.tSendCurrentAddress.Elapsed += new ElapsedEventHandler(this.tSendCurrentAddress_Elapsed);
this.tSendCurrentAddress.Enabled = true;
}
catch (Exception exception1)
{
Exception exception = exception1;
ErrorMsg errorMsg = new ErrorMsg("InquiresCarCurrentAddress", "start", string.Concat("启动查询车辆当前地址信息失败", exception.Message));
this.logHelper.WriteError(errorMsg);
}
}