C++ : Why use exception instead of returning error code