Skip to content

Commit

Permalink
let exceptions flow freely
Browse files Browse the repository at this point in the history
  • Loading branch information
urza committed Jan 16, 2019
1 parent 90960fb commit 5210f7c
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions src/Master/XMLTools.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ public static bool Serialize<T>(T input, string outputFile)

public static T DeSerialize<T>(string inputFile)
{
try
{
//try
//{
// Deserialization
XmlSerializer s = new XmlSerializer(typeof(T));
T newClass;
Expand All @@ -66,18 +66,18 @@ public static T DeSerialize<T>(string inputFile)
}

return newClass;
}
catch (Exception Ex)
{
Logger.Log(Ex);
return default(T);
}
//}
//catch (Exception Ex)
//{
// Logger.Log(Ex);
// return default(T);
//}
}

public static T DeSerializeString<T>(string inputContent)
{
try
{
//try
//{
// Deserialization
XmlSerializer s = new XmlSerializer(typeof(T));
T newClass;
Expand All @@ -87,12 +87,12 @@ public static T DeSerializeString<T>(string inputContent)
}

return newClass;
}
catch (Exception Ex)
{
Logger.Log(Ex);
return default(T);
}
//}
//catch (Exception Ex)
//{
// Logger.Log(Ex);
// return default(T);
//}
}
}
}

0 comments on commit 5210f7c

Please sign in to comment.