Home
Manage Your Code
Snippet: try catch (C#)
Title: try catch Language: C#
Description: Try catch templete for most methods using Exception_Log class. Views: 204
Author: Tim Mays Date Added: 1/31/2008
Copy Code  
1
2try
3{
4    //your code here.
5}
6catch (Exception ex)
7{
8    List<string> Variable_List = new List<string>();
9    Variable_List.Add(": " + "");
10    Exception_Log exLog = new Exception_Log(ex.GetType().ToString(), ex.Message, DateTime.Now.ToString("hh:mm:ss:ff"), Variable_List);
11    Exception_Log_Writer_Reader exWriter = new Exception_Log_Writer_Reader(@"..\..\XML_Exceptions.xml", exLog);
12}
13