Click here to Skip to main content
15,894,825 members
Home / Discussions / Design and Architecture
   

Design and Architecture

 
GeneralRe: POS discount headache Pin
dazfuller6-Aug-07 5:33
dazfuller6-Aug-07 5:33 
GeneralRe: POS discount headache Pin
led mike6-Aug-07 8:42
led mike6-Aug-07 8:42 
GeneralRe: POS discount headache Pin
Robson Félix14-Aug-07 7:01
Robson Félix14-Aug-07 7:01 
AnswerRe: POS discount headache Pin
amit.arora14-Aug-07 4:58
amit.arora14-Aug-07 4:58 
QuestionError States Pin
Leslie Sanford5-Aug-07 17:15
Leslie Sanford5-Aug-07 17:15 
AnswerRe: Error States Pin
Luc Pattyn5-Aug-07 22:52
sitebuilderLuc Pattyn5-Aug-07 22:52 
GeneralRe: Error States Pin
Leslie Sanford6-Aug-07 5:55
Leslie Sanford6-Aug-07 5:55 
GeneralRe: Error States Pin
Luc Pattyn6-Aug-07 6:23
sitebuilderLuc Pattyn6-Aug-07 6:23 
Yes, I think along similar lines.

Some more remarks:

1.
you are allowed to catch Exceptions to your hearts content, but not to hide them:
i.e. you should remedy the problem or somehow let it ripple upwards. There are three ways
to do that:
- not catching the exception at all;
- rethrowing the same exception (a simple "throw;" does that);
- and the favorite: throw a new exception, more specific to your class or method, that
holds the original exception as an "inner Exception".

2.
Your background thread probably already has a Done event, thru which it reports results;
you could use that same event to report problems, so there may not be a need to add
another event.

3.
there are situations where exceptions are more difficult to catch, such as in a constructor,
on a thread you have no control over (say a timer tick), in native code, ... .
The framework has some provisions to catch and handle these too, but I haven't grasped it
completely yet. Things related to this are:
- having try-catch in static Main(); I recommend this, it helps during development,
especially is you show its entire ToString() as one always should.
- AppDomain.CurrentDomain.UnhandledException
- Forms.Application.ThreadException


Greetings,



Luc Pattyn [Forum Guidelines] [My Articles]


this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/AllLanguages/General
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google


Questionencapsulation VS development time Pin
DynV2-Aug-07 14:13
DynV2-Aug-07 14:13 
AnswerRe: encapsulation VS development time Pin
led mike3-Aug-07 5:10
led mike3-Aug-07 5:10 
AnswerRe: encapsulation VS development time Pin
dazfuller6-Aug-07 5:38
dazfuller6-Aug-07 5:38 
QuestionRemove Quote from Writeline output Pin
rfrank535625-Jul-07 8:21
rfrank535625-Jul-07 8:21 
AnswerRe: Remove Quote from Writeline output Pin
..Hubert..26-Jul-07 3:38
..Hubert..26-Jul-07 3:38 
QuestionApplication framework for small or mid sized apps Pin
..Hubert..24-Jul-07 23:45
..Hubert..24-Jul-07 23:45 
AnswerRe: Application framework for small or mid sized apps Pin
drinkwater25-Jul-07 4:26
drinkwater25-Jul-07 4:26 
GeneralRe: Application framework for small or mid sized apps Pin
Dave Herren25-Jul-07 9:55
Dave Herren25-Jul-07 9:55 
GeneralRe: Application framework for small or mid sized apps Pin
..Hubert..25-Jul-07 22:24
..Hubert..25-Jul-07 22:24 
GeneralRe: Application framework for small or mid sized apps Pin
led mike3-Aug-07 5:03
led mike3-Aug-07 5:03 
GeneralRe: Application framework for small or mid sized apps Pin
..Hubert..3-Aug-07 5:38
..Hubert..3-Aug-07 5:38 
GeneralRe: Application framework for small or mid sized apps Pin
led mike3-Aug-07 7:02
led mike3-Aug-07 7:02 
AnswerRe: Application framework for small or mid sized apps Pin
awesomeo21-Aug-07 20:18
awesomeo21-Aug-07 20:18 
QuestionRecording a wave file Pin
Leslie Sanford21-Jul-07 16:35
Leslie Sanford21-Jul-07 16:35 
AnswerRe: Recording a wave file Pin
Luc Pattyn22-Jul-07 1:14
sitebuilderLuc Pattyn22-Jul-07 1:14 
GeneralRe: Recording a wave file Pin
Leslie Sanford22-Jul-07 3:34
Leslie Sanford22-Jul-07 3:34 
GeneralRe: Recording a wave file Pin
Luc Pattyn22-Jul-07 3:45
sitebuilderLuc Pattyn22-Jul-07 3:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.