]> git.tdb.fi Git - libs/core.git/blobdiff - source/strings/regmatch.cpp
Improve exceptions for Regex and RegMatch
[libs/core.git] / source / strings / regmatch.cpp
index 61bed84d459f01f4343f75362a5b488ec1bd0334..4799cfbd4e536b1634ba48b5d5bf625e8da06eb6 100644 (file)
@@ -1,4 +1,4 @@
-#include <msp/core/except.h>
+#include <stdexcept>
 #include "regmatch.h"
 
 using namespace std;
@@ -19,7 +19,7 @@ RegMatch::RegMatch(const string &str, const GroupArray &g):
 const RegMatch::Group &RegMatch::group(unsigned i) const
 {
        if(i>=groups.size())
-               throw InvalidParameterValue("Group index out of range");
+               throw out_of_range("RegMatch::group");
        return groups[i];
 }