Click here to Skip to main content
15,944,832 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: exception and global variable Pin
George_George27-Jan-08 23:50
George_George27-Jan-08 23:50 
GeneralRe: exception and global variable Pin
Maxwell Chen27-Jan-08 23:52
Maxwell Chen27-Jan-08 23:52 
GeneralRe: exception and global variable Pin
George_George27-Jan-08 23:59
George_George27-Jan-08 23:59 
GeneralRe: exception and global variable Pin
Maxwell Chen28-Jan-08 0:04
Maxwell Chen28-Jan-08 0:04 
JokeRe: exception and global variable Pin
CPallini28-Jan-08 0:07
mveCPallini28-Jan-08 0:07 
JokeRe: exception and global variable Pin
CPallini27-Jan-08 23:53
mveCPallini27-Jan-08 23:53 
GeneralRe: exception and global variable Pin
George_George27-Jan-08 23:49
George_George27-Jan-08 23:49 
GeneralRe: exception and global variable Pin
CPallini28-Jan-08 0:04
mveCPallini28-Jan-08 0:04 
George_George wrote:
We can do anything as we like to do in exception handler, like write log.


Yes we you can. But this is NOT the point.
We cannot impose to all people that develop classes for us to write logs. I mean Bjarne refers (probably) to a generic scenario: you haven't control to internal details of the global object you're instancing hence, if it simply throws, you have no chance to catch thrown exception.



George_George wrote:
But my original understanding is, there is no way to catch exceptions from constructor of global variables -- not the limitatino of catching exceptions in main.


Your original understanding is probably wrong (on statistical grounds too Poke tongue | ;-P ).

Smile | :)

If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.

[my articles]


GeneralRe: exception and global variable Pin
George_George28-Jan-08 0:17
George_George28-Jan-08 0:17 
GeneralRe: exception and global variable Pin
CPallini28-Jan-08 0:36
mveCPallini28-Jan-08 0:36 
GeneralRe: exception and global variable Pin
George_George28-Jan-08 13:38
George_George28-Jan-08 13:38 
GeneralRe: exception and global variable Pin
Maxwell Chen27-Jan-08 23:49
Maxwell Chen27-Jan-08 23:49 
GeneralRe: exception and global variable Pin
George_George27-Jan-08 23:57
George_George27-Jan-08 23:57 
GeneralRe: exception and global variable Pin
Maxwell Chen28-Jan-08 0:01
Maxwell Chen28-Jan-08 0:01 
GeneralRe: exception and global variable Pin
Rajesh R Subramanian27-Jan-08 23:34
professionalRajesh R Subramanian27-Jan-08 23:34 
GeneralRe: exception and global variable Pin
George_George27-Jan-08 23:38
George_George27-Jan-08 23:38 
JokeRe: exception and global variable Pin
CPallini27-Jan-08 23:47
mveCPallini27-Jan-08 23:47 
GeneralRe: exception and global variable Pin
George_George27-Jan-08 23:54
George_George27-Jan-08 23:54 
GeneralRe: exception and global variable Pin
Maxwell Chen27-Jan-08 23:57
Maxwell Chen27-Jan-08 23:57 
GeneralRe: exception and global variable Pin
Cedric Moonen27-Jan-08 23:13
Cedric Moonen27-Jan-08 23:13 
GeneralRe: exception and global variable Pin
George_George27-Jan-08 23:24
George_George27-Jan-08 23:24 
GeneralRe: exception and global variable Pin
Cedric Moonen27-Jan-08 23:34
Cedric Moonen27-Jan-08 23:34 
GeneralRe: exception and global variable Pin
George_George27-Jan-08 23:53
George_George27-Jan-08 23:53 
GeneralRe: exception and global variable Pin
Cedric Moonen28-Jan-08 0:05
Cedric Moonen28-Jan-08 0:05 
GeneralRe: exception and global variable Pin
George_George28-Jan-08 0:26
George_George28-Jan-08 0:26 

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.