Pattern: Rethrowing with copy
Issue: -
Rethrowing an exception with throw varname;
creates an unnecessary copy of varname
. To rethrow the caught exception without unnecessary copying or slicing, use a bare throw;
.
Pattern: Rethrowing with copy
Issue: -
Rethrowing an exception with throw varname;
creates an unnecessary copy of varname
. To rethrow the caught exception without unnecessary copying or slicing, use a bare throw;
.