Catch exception by value

release/4.3a0
Frank Dellaert 2018-10-08 22:54:48 -04:00
parent 1bc479fc3c
commit b9f080456c
1 changed files with 1 additions and 1 deletions

View File

@ -29,7 +29,7 @@ void FileWriter::emit(bool add_header, bool force_overwrite) const {
bool file_exists = true;
try {
existing_contents = file_contents(filename_.c_str(), add_header);
} catch (CantOpenFile) {
} catch (const CantOpenFile& e) {
file_exists = false;
}