Browse Source

Don't stomp stack on exception re-throw

Brad Robinson 8 years ago
parent
commit
549016eb26
1 changed files with 2 additions and 2 deletions
  1. 2 2
      PetaJson.cs

+ 2 - 2
PetaJson.cs

@@ -898,11 +898,11 @@ namespace PetaJson
 							{
 								return Enum.Parse(type, (string)literal);
 							}
-							catch (Exception x)
+							catch (Exception)
 							{
 								var attr = type.GetCustomAttributes(typeof(JsonUnknownAttribute), false).FirstOrDefault();
 								if (attr==null)
-									throw x;
+									throw;
 
 								return ((JsonUnknownAttribute)attr).UnknownValue;
 							}