生活中总有一些事情让人狂汗(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出来呢?

谁写的这种脑惨代码呀!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s