namespace LSServerService { using System; using System.Collections.Generic; internal static class LSErrorManage { private static Dictionary m_errList = new Dictionary(); public static string getDes(int dwErrId) { try { return m_errList[dwErrId]; } catch (Exception exception) { PubUtils.WriteLog("LSErrorManage.getDes errormsg: {0}", new object[] { exception }); } return ""; } public static void init() { try { m_errList.Add(ErrorType.SUCCESS, "成功"); m_errList.Add(ErrorType.FILE_EXIST, "文件已经存在"); m_errList.Add(ErrorType.DIRECTORY_EXIST, "文件夹已经存在"); m_errList.Add(ErrorType.FILE_NOT_EXIST, "文件不存在"); m_errList.Add(ErrorType.DIRECTORY_NOT_EXIST, "文件夹不存在"); m_errList.Add(ErrorType.FAIL, "失败"); m_errList.Add(ErrorType.UNKNOWN, "未知错误"); } catch (Exception exception) { PubUtils.WriteLog("LSErrorManage.init errormsg: {0}", new object[] { exception }); } } } }