Home > Articles

  • Print
  • + Share This
This chapter is from the book

Examples

Example: Rethrowing a modified exception. Prefer to rethrow using throw; :

catch( MyException& e ) {                   // catch by reference to non-const
 e.AppendContext("Passed through here");    // modify
 
   throw;                                     
   // rethrow modified object
}
  • + Share This
  • 🔖 Save To Your Account