private string GetFormat(ETipsType type) { if (TipsInfoMap.FormatInfo.TryGetValue(type, out var format)) { return(format); } Log(0, "ERROR!!! miss errorType " + type); return(""); }
public void Deserialize(JSON_TipsParam json) { this.iname = json.iname; this.type = (ETipsType)Enum.ToObject(typeof(ETipsType), json.type); this.order = json.order; this.title = json.title; this.text = json.text; this.images = json.images; this.hide = json.hide != 0; this.cond_text = json.cond_text; }
public void HandlerLog(EWorkStage stage, EErrorLevel level, ETipsType type, string fileName, int lineNum, int colNum, params object[] args) { string lineInfo = (lineNum >= 0 ? ":" + lineNum.ToString() : "") + (colNum >= 0 ? ", " + colNum.ToString() : ""); Log(level, $"{stage} {level}_{((int)type)}: {fileName} {lineInfo} : {string.Format(GetFormat(type), args)}\n"); if (level == EErrorLevel.ERROR) { Exit(); } }
public virtual void Warning(ETipsType type, params object[] args) { _logHandler.HandlerLog(EWorkStage.COMPILE, EErrorLevel.WARNING, type, filePath, lineNum, colNum, args); }