Fix GCC warnings about catching by value
One should stick to the rule: "throw by value, catch by reference"