Exceptions should be catched as "const reference" for better performance.
- Adapt examples in the documentation
- Change all current catch blocks to const refrence
Exceptions should be catched as "const reference" for better performance.
Actually, I would never try to invest in performant error handling, because we don't want that to happen too often. However, it does not hut, so feel free to change it.
It is not only about better performance, but also to avoid memory allocation problems during copy constructor calls if exceptions have been thrown because of low-memory situations.
But mostly, it is just the recommended exception catching "style" :-)
In my opinion the documentation should be adapted as soon as possible so new implementations will (hopefully) be done in the right way. This is easy, so setting this bug to party_easy.
Adapting all the old try and catch blocks will be a lot of work, unless someone writes a script. I don't think that this is that important...
[867af5]: Merge branch 'bug-13051-ExceptionHandlingDocumentation'
2014-10-22 17:00:30 Matthias Eisenmann [2d3001]
Catch const reference exceptions.