|
-
Feb 3rd, 2016, 08:07 AM
#2
Re: Developing a component, some questions
Simply, it's up to you. It depends on the hardware you are communicating with, and how your application will be used, and how that application communicates with your component.
I'd, personally, have the component raise an event when an error is raised, reporting the status/code/data as appropriate. Each time an error occurs then raise the event. You may want to have a method which returns the status of any given error, so the application has a choice on how to get notified of an error.
Do you really mean 'exception', or do you mean the hardware has a problem? There should be no reason for your component to necessarily raise exceptions, unless that's how you want to notify the application of any problems (personally, I receive exception raising for actual code issues, not 'machine status' issues).
"Ok, my response to that is pending a Google search" - Bucky Katt.
"There are two types of people in the world: Those who can extrapolate from incomplete data sets." - Unk.
"Before you can 'think outside the box' you need to understand where the box is."
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
|