forked from boostorg/regex
Added try catch block to catch runtime errors thrown from matching algorithms
[SVN r15374]
This commit is contained in:
@ -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(...)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user