From 9c9b8f3a03951e1b7cc489ce0ec018a03520c039 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 30 Jul 2012 12:25:16 +0200 Subject: Handle regex_format exception at top level --- odb/plugin.cxx | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'odb/plugin.cxx') diff --git a/odb/plugin.cxx b/odb/plugin.cxx index 73ada7a..8920521 100644 --- a/odb/plugin.cxx +++ b/odb/plugin.cxx @@ -11,6 +11,7 @@ #include #include +#include #include #include @@ -137,6 +138,12 @@ gate_callback (void*, void*) generator g; g.generate (*options_, f, *u, file_); } + catch (cutl::re::format const& e) + { + cerr << "error: invalid regex: '" << e.regex () << "': " << + e.description () << endl; + r = 1; + } catch (pragmas_failed const&) { // Diagnostics has aready been issued. -- cgit v1.1