Warning that users must handle

Posted by hagaik on Stack Overflow See other posts from Stack Overflow or by hagaik
Published on 2010-04-06T19:21:58Z Indexed on 2010/04/06 19:23 UTC
Read the original article Hit count: 128

Filed under:

I am looking for a way to set warning that the user will have to respond. In a sense I would like to use late exception mechanize that occur after the function already finished executing.and returned the wanted value.

SomeObject Foo(int input)
{
   SomeObject result;      
   // do something. oh, we need to warn the user. 

   return result;
}

void Main()
{
   SomeObject object;
   object = Foo(1); // after copy consturctor is done I would like an exception to be thrown


}

© Stack Overflow or respective owner

Related posts about c++