diff options
Diffstat (limited to 'tests/utils/test6.cpp')
-rwxr-xr-x | tests/utils/test6.cpp | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/tests/utils/test6.cpp b/tests/utils/test6.cpp index 839f69b..6ad9e10 100755 --- a/tests/utils/test6.cpp +++ b/tests/utils/test6.cpp @@ -2,19 +2,25 @@ #include <iostream> #include <algorithm> +#include <stdexcept> using namespace std; int main( void ) { - vector<string> entries = directory_entries( "test6.DATA", true, true ); - - sort( entries.begin( ), entries.end( ) ); - - vector<string>::const_iterator it, end = entries.end( ); - for( it = entries.begin( ); it != end; it++ ) { - cout << (*it) << endl; + try { + vector<string> entries = directory_entries( "test6.DATA", true, true ); + + sort( entries.begin( ), entries.end( ) ); + + vector<string>::const_iterator it, end = entries.end( ); + for( it = entries.begin( ); it != end; it++ ) { + cout << (*it) << endl; + } + + return 0; + } catch( exception &e ) { + cerr << "ERROR: " << e.what( ) << endl; + return 1; } - - return 0; } |