Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mmt-errorView
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Christian Maeder
mmt-errorView
Commits
a2c39b29
Commit
a2c39b29
authored
Jan 27, 2015
by
cmaeder
Browse files
Options
Downloads
Patches
Plain Diff
renamed variables
parent
9f9f26bc
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/scala/ParseXML.scala
+3
-3
3 additions, 3 deletions
src/main/scala/ParseXML.scala
with
3 additions
and
3 deletions
src/main/scala/ParseXML.scala
+
3
−
3
View file @
a2c39b29
...
...
@@ -40,9 +40,9 @@ class ParseXML(db: PopulateDB) {
def
procErr
(
f
:
File
,
x
:
Node
)
:
Unit
=
{
val
elems
=
x
.
child
filter
(
c
=>
c
.
isInstanceOf
[
Elem
])
val
List
(
t
,
sm
sg
,
level
)
=
getAttrs
(
List
(
"type"
,
"shortMsg"
,
"level"
),
x
)
val
List
(
errType
,
shortM
sg
,
level
)
=
getAttrs
(
List
(
"type"
,
"shortMsg"
,
"level"
),
x
)
def
infoMessage
(
msg
:
String
)
=
log
.
info
(
msg
+
"\nFile: "
+
f
+
"\nNode: "
+
s
m
sg
)
log
.
info
(
msg
+
"\nFile: "
+
f
+
"\nNode: "
+
s
hortM
sg
)
var
lvl
:
Int
=
0
if
(
level
.
isEmpty
)
infoMessage
(
"empty error level"
)
else
...
...
@@ -52,7 +52,7 @@ class ParseXML(db: PopulateDB) {
case
e
:
NumberFormatException
=>
infoMessage
(
e
.
getMessage
)
}
// see Table.columns for the proper argument order
val
vs
=
List
(
f
.
getPath
,
t
,
sm
sg
,
level
,
x
.
text
)
val
vs
=
List
(
f
.
getPath
,
errType
,
shortM
sg
,
level
,
x
.
text
)
assert
(
vs
.
length
==
Table
.
columns
.
length
)
db
.
insertRow
(
vs
)
if
(
elems
.
nonEmpty
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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