What is the difference between throw and throw with arg of caught exception?

Viewed 6500

Imagine two similar pieces of code:

try {
  [...]
} catch (myErr &err) {
  err.append("More info added to error...");
  throw err;
}

and

try {
  [...]
} catch (myErr &err) {
  err.append("More info added to error...");
  throw;
}

Are these effectively the same or do they differ in some subtle way? For example, does the first one cause a copy constructor to be run whereas perhaps the second reuses the same object to rethrow it?

2 Answers
Related