Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
memoriav
Memobase 2020
services
postprocessing
Media Converter
Commits
f54a02c6
Unverified
Commit
f54a02c6
authored
Nov 28, 2020
by
Sebastian Schüpbach
Browse files
print preciser error messages when retrieving failed
Signed-off-by:
Sebastian Schüpbach
<
sebastian.schuepbach@unibas.ch
>
parent
2b6496e2
Pipeline
#18033
passed with stages
in 7 minutes and 59 seconds
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
src/main/scala/ch/memobase/App.scala
View file @
f54a02c6
...
...
@@ -65,16 +65,16 @@ object App extends scala.App with Logging with RecordUtils {
processed
<-
recordProcessor
.
process
(
record
)
}
yield
(
record
,
processed
)
match
{
case
(
rec
,
ProcessSuccess
(
id
,
msg
))
=>
logger
.
debug
(
msg
)
logger
.
debug
(
s
"$id: $
msg
"
)
reporter
.
send
(
ReportingObject
(
id
,
ProcessingSuccess
,
msg
,
getInstitutionAndRecordSet
(
rec
.
value
)))
case
(
rec
,
ProcessIgnore
(
id
,
msg
))
=>
logger
.
info
(
msg
)
logger
.
info
(
s
"$id: $
msg
"
)
reporter
.
send
(
ReportingObject
(
id
,
ProcessingIgnore
,
msg
,
getInstitutionAndRecordSet
(
rec
.
value
)))
case
(
rec
,
ProcessWarning
(
id
,
msg
))
=>
logger
.
warn
(
msg
)
logger
.
warn
(
s
"$id: $
msg
"
)
reporter
.
send
(
ReportingObject
(
id
,
ProcessingWarning
,
msg
,
getInstitutionAndRecordSet
(
rec
.
value
)))
case
(
rec
,
ProcessFatal
(
id
,
msg
,
ex
))
=>
logger
.
error
(
msg
)
logger
.
error
(
s
"$id: $msg: ${ex.getMessage}"
)
logger
.
debug
(
ex
.
getStackTrace
.
mkString
(
"\n"
))
reporter
.
send
(
ReportingObject
(
id
,
ProcessingFatal
,
msg
,
getInstitutionAndRecordSet
(
rec
.
value
)))
}
...
...
src/main/scala/ch/memobase/RecordProcessor.scala
View file @
f54a02c6
...
...
@@ -68,7 +68,7 @@ class RecordProcessor(fileHandler: DisseminationCopyHandler,
binaryResource
.
mimeType
,
binaryResource
.
instantiationType
,
data
)
case
Failure
(
ex
)
=>
List
(
ProcessFatal
(
recordKey
,
"Failed to retrieve binary from Fedora"
,
ex
))
case
Failure
(
ex
)
=>
List
(
ProcessFatal
(
recordKey
,
s
"Failed to retrieve binary from Fedora
on ${binaryResource.filePath}
"
,
ex
))
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment