Catch C++ exceptions by const reference

Fixes #2277
This commit is contained in:
Charles Milette
2018-05-19 19:18:26 -04:00
parent b9fd381eee
commit 72c0002b45
22 changed files with 36 additions and 38 deletions

View File

@ -70,9 +70,7 @@ QString GetMinecraftJarVersion(QString jarName)
}
}
}
catch (java::classfile_exception &)
{
}
catch (java::classfile_exception) { }
// clean up
delete[] classfile;

View File

@ -32,7 +32,7 @@ int main(int argc, char **argv)
{
unpack_200(input, output);
}
catch (std::runtime_error &e)
catch (const std::runtime_error &e)
{
std::cerr << "Bad things happened: " << e.what() << std::endl;
fclose(input);