.NET: Which Exception to Throw When a Required Configuration Setting is Missing?

后端 未结 11 1121
星月不相逢
星月不相逢 2020-12-23 20:18

Here\'s a standard scenario:

if(string.IsNullOrEmpty(Configuration.AppSettings[\"foobar\"]))
   throw new SomeStandardException(\"Application not configured          


        
11条回答
提交回复
热议问题