How do we define C++ exceptions?
Basically, we have two easy options for defining exceptions in C++ classes and programs: We can use the POCO::Exception class or the older and less capable NTRB::base_
Setup for either is pretty simple, but the Poco::Exception class has the advantage of being able to carry significant additional information about the exception with very little extra effort. Both of the following examples would occur in the public section of the transceiver class header...
The old style exception is declared like this:
// parent of all transceiver exceptions.
class general_exception:: public ntrb::base_
The Poco::Exception version is like this:
// parent of all transceiver exceptions
POCO_
I don't see either as very complex or hard to use, but knowing the limitations of the older NRTB::base_
Whichever way we go, I'd like for us to be consistent within NRTB and I'd like us to settle this soon so that we don't have to go back and re-engineer a lot of stuff to get it all in line later. Therefore, I'm gonna hold this question open until Friday, March 11th, 2011, at which time a final decision will be published.
Question information
- Language:
- English Edit question
- Status:
- Solved
- Assignee:
- No assignee Edit question
- Solved by:
- Rick Stovall
- Solved:
- Last query:
- Last reply: