Details
-
Bug
-
Resolution: Fixed
-
Major
-
2.1.0
-
Security Level: Public
-
None
-
SmartOS with gcc 4.7
Description
We're using C++ exceptions to track problems during reading the content of a file (missing file, incomplete reads etc). The problem is that exceptions in C++ is a really shaky feature. Currently we're catching:
const std::ifstream::failure &e
but this fails on SmartOS with gcc 4.7, instead it is able to catch:
std::ifstream::failure e
(which is also what's used in the example in http://www.cplusplus.com/reference/ios/ios/exceptions/ )
Given that the above code is already used in our product and verified to work on windows, linux and macos I figured it would be safer to just add a "catch-all" clause that catchs all other errors.