Re #9386. Rethrow original exception, not a copy.
Re #9386. Pass string by reference instead of value.
Merge branch 'bugfix/9386_cppcheck_warnings' into develop