mirror of
https://github.com/corda/corda.git
synced 2025-06-13 04:38:19 +00:00
CORDA-2183: Show root cause of error in console to aid with debugging (#4178)
* Show root cause of error in console * Add more explicit logical separator between message and root error * Add default if e.cause is null
This commit is contained in:
@ -554,7 +554,11 @@ abstract class AbstractNode<S>(val configuration: NodeConfiguration,
|
||||
log.error("${it.name}, as a Corda service, must have a constructor with a single parameter of type " +
|
||||
ServiceHub::class.java.name)
|
||||
} catch (e: ServiceInstantiationException) {
|
||||
log.error("Corda service ${it.name} failed to instantiate", e.cause)
|
||||
if (e.cause != null) {
|
||||
log.error("Corda service ${it.name} failed to instantiate. Reason was: ${e.cause?.rootMessage}", e.cause)
|
||||
} else {
|
||||
log.error("Corda service ${it.name} failed to instantiate", e)
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
log.error("Unable to install Corda service ${it.name}", e)
|
||||
}
|
||||
|
Reference in New Issue
Block a user