dump pattern if pcre compilation failed.
This commit is contained in:
parent
4f36b0b27c
commit
256cb8435a
1 changed files with 1 additions and 2 deletions
|
@ -159,7 +159,6 @@ void r3_tree_compile_patterns(node * n) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
n->ov_cnt = (1 + n->edge_len) * 3;
|
n->ov_cnt = (1 + n->edge_len) * 3;
|
||||||
n->ov = (int*) calloc(sizeof(int), n->ov_cnt);
|
n->ov = (int*) calloc(sizeof(int), n->ov_cnt);
|
||||||
|
|
||||||
|
@ -185,7 +184,7 @@ void r3_tree_compile_patterns(node * n) {
|
||||||
&erroffset, /* for error offset */
|
&erroffset, /* for error offset */
|
||||||
NULL); /* use default character tables */
|
NULL); /* use default character tables */
|
||||||
if (n->pcre_pattern == NULL) {
|
if (n->pcre_pattern == NULL) {
|
||||||
printf("PCRE compilation failed at offset %d: %s\n", erroffset, error);
|
printf("PCRE compilation failed at offset %d: %s, pattern: %s\n", erroffset, error, n->combined_pattern);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
n->pcre_extra = pcre_study(n->pcre_pattern, 0, &error);
|
n->pcre_extra = pcre_study(n->pcre_pattern, 0, &error);
|
||||||
|
|
Loading…
Reference in a new issue