Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
WCCL
Manage
Activity
Members
Labels
Plan
Issues
4
Issue boards
Milestones
Wiki
Redmine
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Analysers
WCCL
Commits
a7d583e0
Commit
a7d583e0
authored
14 years ago
by
ilor
Browse files
Options
Downloads
Patches
Plain Diff
rework regex exception message
parent
c3727b43
Branches
Branches containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
libwccl/ops/functions/bool/predicates/regex.cpp
+6
-8
6 additions, 8 deletions
libwccl/ops/functions/bool/predicates/regex.cpp
libwccl/ops/functions/bool/predicates/regex.h
+3
-6
3 additions, 6 deletions
libwccl/ops/functions/bool/predicates/regex.h
with
9 additions
and
14 deletions
libwccl/ops/functions/bool/predicates/regex.cpp
+
6
−
8
View file @
a7d583e0
...
...
@@ -11,21 +11,19 @@ RegexParseError::RegexParseError(
const
UErrorCode
&
status_code
,
const
UParseError
&
parse_error
)
:
WcclError
(
"Could not parse regular expression."
),
pattern
(
pattern
),
status
(
u_errorName
(
status_code
)),
pattern_line
(
parse_error
.
line
),
offset
(
parse_error
.
offset
),
pre_context
(
PwrNlp
::
to_utf8
(
UnicodeString
(
parse_error
.
preContext
))),
error
(
PwrNlp
::
to_utf8
(
UnicodeString
(
parse_error
.
postContext
))),
expression
(
PwrNlp
::
to_utf8
(
UnicodeString
(
pattern
)))
upe
(
parse_error
)
{
}
std
::
string
RegexParseError
::
info
()
const
{
std
::
stringstream
ss
;
ss
<<
"Could not parse regular expression at line "
<<
pattern_line
<<
" offset "
<<
offset
<<
". Status: "
<<
status
<<
". Error: "
<<
error
<<
". Expression was: "
<<
expression
;
ss
<<
"Could not parse regular expression at line "
<<
upe
.
line
<<
" offset "
<<
upe
.
offset
<<
". Status: "
<<
status
<<
". Error: "
<<
PwrNlp
::
to_utf8
(
UnicodeString
(
upe
.
postContext
))
<<
". Expression was: "
<<
PwrNlp
::
to_utf8
(
pattern
);
return
ss
.
str
();
}
...
...
This diff is collapsed.
Click to expand it.
libwccl/ops/functions/bool/predicates/regex.h
+
3
−
6
View file @
a7d583e0
...
...
@@ -68,12 +68,9 @@ public:
std
::
string
info
()
const
;
const
std
::
string
status
;
const
int
pattern_line
;
const
int
offset
;
const
std
::
string
pre_context
;
const
std
::
string
error
;
const
std
::
string
expression
;
UnicodeString
pattern
;
std
::
string
status
;
UParseError
upe
;
};
}
/* end ns Wccl */
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment