生活中总有一些事情让人狂汗(51)

昨天看败的test case,看到一个NullReferenceException,一路看下去,发现是从这个NoRetry()里那个catch里面抛出来的:

    public static void NoRetry(Action action)
    {
        try
        {
            action();
        }
        catch (TableRetryWrapperException e)
        {
            throw e.InnerException;
        }
    }

然后我就郁闷了,到底是TableRetryWrapperException的InnerException是一个NullReferenceException,还是说那个TableRetryWrapperException的InnerException是null,导致e.InnerException抛了一个NullReferenceException出来呢?

谁写的这种脑惨代码呀!

Comments on “生活中总有一些事情让人狂汗(51)

Leave a Reply