Marco Wedekind wrote:
Hello,
I am using the Filesystem library from boost 1.38.0 on Windows (Visual Studio 2005) like this:
if (boost::filesystem::exists("W:") && boost::filesystem::is_empty("W:")) { ... do something useful ... }
"W:" is assigned to an (usually) empty card reader slot. Unfortunately Filesystem's exists() function fails with an uncatchable exception. At least I cannot catch it... The exception is thrown by GetFileAttributesA() in operations.hpp:
inline DWORD get_file_attributes( const char * ph ) { return ::GetFileAttributesA( ph ); }
The exception pops up an error message that is titled "Windows - no disc" and it says:
Exception Processing Message c0000013 Parameters 75b0bf9c 4 75b0bf9c 75b0bf9c
This is a Windows structured exception, not a C++ exception. A call to SetErrorMode( SEM_FAILCRITICALERRORS ) may be what you need. http://msdn.microsoft.com/en-us/library/ms680621%28VS.85%29.aspx