Questions tagged [exception-safe]

17 questions
0
votes
2 answers

Exception Safety example guarantee correct?

I discuss the Exception Safety Guaratees and devised an example that I think provides the Strong Guarantee: template void strongSort(vector &data, LT lt) // works on pointers { vector temp { data }; // bad_alloc?…
towi
  • 21,587
  • 28
  • 106
  • 187
0
votes
2 answers

Exception safety/handling with .Net HtmlTextWriter?

I am using a .Net HtmlTextWriter to generate HTML. try { htw.RenderBeginTag( HtmlTextWriterTag.Span ); htw.Write(myObject.GenerateHtml()); htw.RenderEndTag( ); } catch (Exception e) { GenerateHtmlErrorMessage(htw); } In this example,…
tpower
  • 56,100
  • 19
  • 68
  • 100
1
2