我知道,我可以使用<代码>MessageBox.Show(“一些错误”),但我说的是,在我的法典中,在某种较低层次上出现了一种错误,即没有企业要放弃一种电文,或者没有其他电文。
I m building an RSS Client and I have a class which manages the various feeds (lets say FeedManager
) which is just a wrapper for a list at this point. Now this class calls on another class for data access. So anytime someone in the GUI wants to save the feeds, the GUI simply calls FeedManager.SaveFeeds()
which processes the feeds and saves them to a file, database, etc. So I attempt to save to a file and something bad happens (either something I coded for or an exception). So now I m at least 3 levels deep, GUI
-> FeedManager
-> SomeDataAccessLayer
, and I want to display a message to the user like "Hey, that file was not found" or "You don t have permission to write to that location", etc...
我应如何做到这一点? 在数据存取层上安装了MessageBox
,这明目张胆地表明,构成家庭调查的夫妇。 采用所有方法的回报都带有任何错误信息,似乎也令人难以置信。