Browse Source

Don't stomp stack on exception re-throw

Brad Robinson 8 năm trước cách đây
mục cha
commit
549016eb26
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  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;
 							}