test: show raw exception test-exception
authorKyle Fuller <redacted>
Fri, 13 Jan 2017 03:02:28 +0000 (03:02 +0000)
committerKyle Fuller <redacted>
Fri, 13 Jan 2017 03:02:28 +0000 (03:02 +0000)
test-regex.cpp

index f3c77c6c1d44f6c4cc877ac5b8b1e0a53f4222d8..54332b706fa2c85f5d5ae97585aa69cac397b6be 100644 (file)
@@ -7,13 +7,8 @@ int main(int argc, const char *argv[]) {
     std::string message = "Hello nickname.";
     std::string matcher = "\\bnickname\\b";
 
-    try {
-        std::regex expression = std::regex(matcher, std::regex_constants::ECMAScript | std::regex_constants::icase);
-        std::regex_search(message, match, expression);
-    } catch (std::regex_error& error) {
-        std::cout << "Your C++ compiler doesn't properly support regex. Please upgrade to GCC 4.9, Clang or newer.\n";
-        return 1;
-    }
+    std::regex expression = std::regex(matcher, std::regex_constants::ECMAScript | std::regex_constants::icase);
+    std::regex_search(message, match, expression);
 
     if (match.empty()) {
         return 1;
git clone https://git.99rst.org/PROJECT