Commit 8b891d59 authored by Jonas Waeber's avatar Jonas Waeber
Browse files

Improve error logging

parent 971cb67a
Pipeline #20495 passed with stage
in 2 minutes and 3 seconds
......@@ -40,7 +40,12 @@ class RicoResource(val resource: Resource) {
return try {
resource.getProperty(RDF.type).resource
} catch (ex: IllegalStateException) {
val message = "Resource without a ricoType: $resource." + ex.localizedMessage
val id = if (resource.isAnon) {
resource.id.labelString
} else {
resource.uri
}
val message = "Resource without a rdf:type: $id" + ex.localizedMessage
log.error(message)
throw InvalidInputException(message)
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment