Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Levels of exception safety in C++

Reply
Thread Tools

Levels of exception safety in C++

 
 
Pallav singh
Guest
Posts: n/a
 
      03-06-2011
Hi All ,

I am new to C++. I was looking to several levels of exception safety:

++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++++++
Basic exception safety: Partial execution of failed operations can
cause
side effects, but invariants on the state are preserved. Any stored
data will
contain valid values even if data has different values now from before
the exception.

http://en.wikipedia.org/wiki/Exception_handling
++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++++++
stable state. An object's state is stable if none of its member or
friend
functions, when called with arguments that
satisfy their
preconditions, result in undefined behavior.
[Note: in particular, this applies to the object's destructor.]
http://www.open-std.org/jtc1/sc22/wg...1997/N1077.asc
++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++++++

I am not able to understand them. How can they occur in Code.

Thanks in Advance
Pallav Singh
 
Reply With Quote
 
 
 
 
WQ
Guest
Posts: n/a
 
      03-07-2011
"Pallav singh" <> > Hi All ,
>
> I am new to C++. I was looking to several levels of exception safety:


I did read something about exception safe in C++,

Here is a good reading/discussing on the three levels safety.

http://stackoverflow.com/questions/1...tion-safe-code


 
Reply With Quote
 
 
 
 
James Kanze
Guest
Posts: n/a
 
      03-07-2011
On Mar 7, 5:38 am, "WQ" <n...@no.no> wrote:
> "Pallav singh" <singh.pal...@gmail.com> > Hi All ,


> > I am new to C++. I was looking to several levels of exception safety:


> I did read something about exception safe in C++,


> Here is a good reading/discussing on the three levels safety.


> http://stackoverflow.com/questions/1...lly-write-exce...


Bof. Like in the newsgroups, you have to be selective. The way
the original question was phrased, it sounded almost like a
troll. One of the responses was very good, but the rest varied
from ordinary to downright bad. (Your reaction seems to be to
the one that was good, because it was the only one which
mentionned the different levels of exception safety.)

--
James Kanze
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
not swallowed levels of the backtrace on unrescued exception Roger Pack Ruby 1 02-08-2009 06:09 PM
Exception of type 'System.Web.HttpUnhandledException' wasthrown.Exception has been thrown by the target of an invocation.System.WebSystem.Exception jobs ASP .Net 1 11-16-2007 05:57 PM
while executing my client program i get the exception javax.naming.LinkException: [Root exception is javax.naming.LinkException: [Root exception is javax.naming.NameNotFoundException: remaining if plz anybody know how to solve this problem then mahesh Java 0 03-08-2007 12:26 PM
array exception safety Klaus Ahrens C++ 1 12-08-2003 03:50 PM
Exception safety in the STL John Harrison C++ 5 07-08-2003 05:55 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57