Search This Blog

Friday, May 13, 2011

ExceptionalC++ Fun: 10. Exception Safe code. your argument might failed inside another function argument

  • example.   Copy(stack.pop()); 
        what if Copy failed? not good, your stack.pop() might already popped something out, while your copy operation is not good.

things to remember: exception safety is a design, it's not just "this function is exception safe, we all good"

No comments: