Your opinion please
- From: "C# Beginner" <def_daemon@xxxxxxxxx>
- Date: Tue, 28 Nov 2006 21:44:41 +0100
I'm currently creating a database class, which contains a member called
Open(). With this method users can open different databases. When a user
tries to open a database which happens to be secured with useraccounts
(username, password etc), the user should be notifed to login.
Now, in my opinion their are 3 ways to cope with situation:
1. Exit the method nicely with an errorcode (eg access denied, specify
accountinformation and try again)
2. Fire an exception
3. Fire an event (eg a LoginEvent, with cancel option) and wait until the
user specifies his username, password
etc within an exceptionhandler. This means that the Open() must wait
until the user responses.
I'm not looking for a good solution, but I'm more interested in opions with
good arguments.
Is there anybody out there who´s willing to share his opinion?
thnx
DD
.
- Follow-Ups:
- Re: Your opinion please
- From: Dave Sexton
- Re: Your opinion please
- Prev by Date: Re: Dynamic casting
- Next by Date: Re: GridView Cells
- Previous by thread: Re: Gracefully kill a console app?
- Next by thread: Re: Your opinion please
- Index(es):
Relevant Pages
|