projects
/
anna.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Trace regex exception
[anna.git]
/
example
/
diameter
/
launcher
/
Launcher.cpp
diff --git
a/example/diameter/launcher/Launcher.cpp
b/example/diameter/launcher/Launcher.cpp
index
0fcfd52
..
dec3008
100644
(file)
--- a/
example/diameter/launcher/Launcher.cpp
+++ b/
example/diameter/launcher/Launcher.cpp
@@
-2285,7
+2285,14
@@
void Launcher::eventOperation(const std::string &operation, std::string &respons
if(param4 != "strict") {
std::string s_from = "hop-by-hop-id=\"[0-9]+\" end-to-end-id=\"[0-9]+\"";
std::string s_to = s_from;
if(param4 != "strict") {
std::string s_from = "hop-by-hop-id=\"[0-9]+\" end-to-end-id=\"[0-9]+\"";
std::string s_to = s_from;
- regexp = std::regex_replace (regexp, std::regex(s_from), s_to);
+
+ try {
+ regexp = std::regex_replace (regexp, std::regex(s_from), s_to);
+ }
+ catch (const std::regex_error& e) {
+ throw anna::RuntimeException(e.what(), ANNA_FILE_LOCATION);
+ }
+
//regexp.insert(0, "^");
//regexp += "$";
}
//regexp.insert(0, "^");
//regexp += "$";
}