瀏覽代碼

Don't stomp stack on exception re-throw

Brad Robinson 8 年之前
父節點
當前提交
549016eb26
共有 1 個文件被更改,包括 2 次插入2 次删除
  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;
 							}