1
0
mirror of https://github.com/ACINQ/eclair.git synced 2025-01-19 05:33:59 +01:00

Do not print the stacktrace on stderr when there is an error at boot (#966)

* Do not print the stacktrace on stdout when there is an error at boot
This commit is contained in:
araspitzu 2019-04-25 13:16:27 +02:00 committed by GitHub
parent 650c5049d5
commit 1d486f4584
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 4 deletions

View File

@ -40,8 +40,9 @@ object JavafxBoot extends App with Logging {
}
} catch {
case t: Throwable =>
System.err.println(s"fatal error: ${t.getMessage}")
logger.error(s"fatal error: ${t.getMessage}")
val errorMsg = if (t.getMessage != null) t.getMessage else t.getClass.getSimpleName
System.err.println(s"fatal error: $errorMsg")
logger.error(s"fatal error: $errorMsg", t)
System.exit(1)
}
}

View File

@ -47,8 +47,9 @@ object Boot extends App with Logging {
}
def onError(t: Throwable): Unit = {
logger.error(s"fatal error:", t)
t.printStackTrace()
val errorMsg = if (t.getMessage != null) t.getMessage else t.getClass.getSimpleName
System.err.println(s"fatal error: $errorMsg")
logger.error(s"fatal error: $errorMsg", t)
System.exit(1)
}
}