MXS-2785: Report PCRE2 errors
The substitution string could cause errors.
This commit is contained in:
@ -28,10 +28,15 @@ namespace maxscale
|
||||
* @param re Compiled pattern to use
|
||||
* @param subject Subject string
|
||||
* @param replace Replacement string
|
||||
* @param error Pointer to std::string where any error messages are stored
|
||||
*
|
||||
* @return The replaced string or the original string if no replacement was made
|
||||
* @return The replaced string or the original string if no replacement was made. Returns an empty string when
|
||||
* any PCRE2 error is encountered.
|
||||
*/
|
||||
std::string pcre2_substitute(pcre2_code* re, const std::string& subject, const std::string& replace);
|
||||
std::string pcre2_substitute(pcre2_code* re,
|
||||
const std::string& subject,
|
||||
const std::string& replace,
|
||||
std::string* error = nullptr);
|
||||
|
||||
/**
|
||||
* @class CloserTraits<pcre2_code*> pcre2.hh <maxscale/pcre2.hh>
|
||||
|
Reference in New Issue
Block a user