Click here to Skip to main content
15,914,419 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generaltrying to disable a menu item in an MDI Pin
ns3-Jul-02 3:45
ns3-Jul-02 3:45 
GeneralRe: trying to disable a menu item in an MDI Pin
Mike Upton5-Jul-02 2:56
Mike Upton5-Jul-02 2:56 
GeneralRe: trying to disable a menu item in an MDI Pin
ns5-Jul-02 3:08
ns5-Jul-02 3:08 
Generalcombining MFC and callback function Pin
3-Jul-02 3:40
suss3-Jul-02 3:40 
GeneralRe: combining MFC and callback function Pin
_Magnus_3-Jul-02 3:46
_Magnus_3-Jul-02 3:46 
GeneralRe: combining MFC and callback function Pin
3-Jul-02 21:52
suss3-Jul-02 21:52 
Generalfile /open dialog filter in MDI Pin
ns3-Jul-02 3:24
ns3-Jul-02 3:24 
GeneralDeclaring function that throw exceptions Pin
Alexandru Savescu3-Jul-02 3:07
Alexandru Savescu3-Jul-02 3:07 
I believe that, in C++, if a function may throw an exception, you should declare it like this:
<br />
int myfunc() throw (CMyException);<br />


The problem is that VC (even .NET) issues a warning that it disregards my declaration as the ANSI standard is not very specific when using functions that throw exceptions. In fact, I think the function may very well throw an exception of another type, not the one declared.

The question is:
Do you decorate your function declarations with an exception specification or don't bother since it does not matter. Why? Because it is good design? Also, if you do, do you use the throw (CMyException) both in the header and the implementation file?

Best regards,
Alexandru Savescu
GeneralRe: Declaring function that throw exceptions Pin
Orbital^3-Jul-02 3:27
Orbital^3-Jul-02 3:27 
GeneralRe: Declaring function that throw exceptions Pin
Alexandru Savescu3-Jul-02 3:32
Alexandru Savescu3-Jul-02 3:32 
GeneralRe: Declaring function that throw exceptions Pin
Orbital^3-Jul-02 3:43
Orbital^3-Jul-02 3:43 
GeneralRe: Declaring function that throw exceptions Pin
Len Holgate3-Jul-02 22:14
Len Holgate3-Jul-02 22:14 
GeneralCharacter Sets Pin
Matthew R. Miller3-Jul-02 2:23
Matthew R. Miller3-Jul-02 2:23 
GeneralProbelm in reading images Pin
SamirSood3-Jul-02 1:39
SamirSood3-Jul-02 1:39 
GeneralGDI+ and MFC Pin
Williams3-Jul-02 1:38
Williams3-Jul-02 1:38 
GeneralRe: GDI+ and MFC Pin
Christian Graus3-Jul-02 1:53
protectorChristian Graus3-Jul-02 1:53 
QuestionWhere can I find a DB2 CLI function C++ class wrapper? Pin
wabc3-Jul-02 0:51
wabc3-Jul-02 0:51 
AnswerRe: Where can I find a DB2 CLI function C++ class wrapper? Pin
DiWa4-Jul-02 0:13
DiWa4-Jul-02 0:13 
GeneralList Control with Printing Support Pin
Renjith Ramachandran3-Jul-02 0:16
Renjith Ramachandran3-Jul-02 0:16 
GeneralRe: List Control with Printing Support Pin
surbinsho3-Jul-02 2:03
surbinsho3-Jul-02 2:03 
GeneralRe: List Control with Printing Support Pin
Ravi Bhavnani3-Jul-02 3:41
professionalRavi Bhavnani3-Jul-02 3:41 
GeneralRe: List Control with Printing Support Pin
surbinsho3-Jul-02 18:27
surbinsho3-Jul-02 18:27 
GeneralRe: List Control with Printing Support Pin
surbinsho4-Jul-02 19:07
surbinsho4-Jul-02 19:07 
GeneralGetting enter keypress in a control Pin
Chou3-Jul-02 0:06
Chou3-Jul-02 0:06 
GeneralRe: Getting enter keypress in a control Pin
Nish Nishant3-Jul-02 0:57
sitebuilderNish Nishant3-Jul-02 0:57 

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.