Added try catch block to catch runtime errors thrown from matching algorithms

[SVN r15374]
This commit is contained in:
John Maddock
2002-09-16 11:55:23 +00:00
parent c7c8400efa
commit eeae9a0762

View File

@ -90,6 +90,7 @@ bool ogrep_predicate<iterator, Allocator>::operator()(const boost::match_results
void process_grep(const char* file)
{
try{
using namespace boost;
mapfile f(file);
unsigned int count = 0;
@ -119,6 +120,14 @@ void process_grep(const char* file)
}
}
}
catch(const std::exception& e)
{
std::cerr << std::endl << e.what() << std::endl;
}
catch(...)
{
}
}