|
-
Apr 20th, 2004, 01:55 AM
#1
Thread Starter
Frenzied Member
Message boxes from class libraries?
I have made a class library which is to be used with a winforms app. IN the class library I use message boxes to inform the user of any exceptions. But when creating a new winforms app, and begin using the classlibrary, the messageboxes won't show up, instead I get an unhandled exception. Am I thinking wrong here?
kind regards
Henrik
-
Apr 20th, 2004, 03:18 PM
#2
Fanatic Member
I think it is a bad idea to mix your UI with your dll unless you are aware of the consequences. What would happen when you try and use that dll for a web application?
Anyway, you should be able to see your form, as I have done it before. Can you post some code where you show it or if you get an exception post the ex.tostring()?
-
Apr 20th, 2004, 04:37 PM
#3
Thread Starter
Frenzied Member
Gaah... yes you are right... of course I shouldn't mix those!!!!!
Any suggestions on what to return to the developer when there is an exception?
E.g. what should I do in the catch?
kind regards
Henrik
-
Apr 21st, 2004, 06:49 AM
#4
Fanatic Member
In the catch I usually throw up a new exception that has the original exception as it's inner exception and has my custom exception string that states what happened and may have some values for variables, etc.
I am curious as to how others might be handling this?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|