
Hello Ovanes, Yes, I can catch more general exceptions like: boost::system_error or std::runtime_error or std::exception (or any other unknown exception via catch(...) ) but the custom text added by boost::file system are all different. Then there's still no way no handle them in one place completely. Thanks for your information anyway. B/Rgds Max From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Ovanes Markarian Sent: Wednesday, April 29, 2009 10:26 PM To: boost-users@lists.boost.org Subject: Re: [Boost-users] [filesystem] Hoe to depress boost::filesystem::basic_directory_iterator constructor? On Wed, Apr 29, 2009 at 3:20 PM, Max <more4less@sina.com> wrote: Hello Ovanes, Thanks for your reply. You means like this? catch ( const fs::basic_filesystem_error<fs::path>& e ) { // transform e.what() to a new string by search and replace // rethrow an exception } That would be ok for this single case. But who knows if there's other similar cases that need this similar hand-written code processing? I want to depress the similar message in a uniform way. You can also catch more general exceptions like: boost::system_error or std::runtime_error or std::exception (or any other unknown exception via catch(...) ) And handle them... Regards, Ovanes