gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libeufin] branch master updated: logging


From: gnunet
Subject: [libeufin] branch master updated: logging
Date: Sat, 28 Oct 2023 11:32:31 +0200

This is an automated email from the git hooks/post-receive script.

ms pushed a commit to branch master
in repository libeufin.

The following commit(s) were added to refs/heads/master by this push:
     new fc6771ba logging
fc6771ba is described below

commit fc6771ba0d197a0b77a48077942190354dffd771
Author: MS <ms@taler.net>
AuthorDate: Sat Oct 28 11:32:19 2023 +0200

    logging
---
 nexus/src/main/kotlin/tech/libeufin/nexus/EbicsSubmit.kt | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/nexus/src/main/kotlin/tech/libeufin/nexus/EbicsSubmit.kt 
b/nexus/src/main/kotlin/tech/libeufin/nexus/EbicsSubmit.kt
index f065550e..51190a4f 100644
--- a/nexus/src/main/kotlin/tech/libeufin/nexus/EbicsSubmit.kt
+++ b/nexus/src/main/kotlin/tech/libeufin/nexus/EbicsSubmit.kt
@@ -124,7 +124,7 @@ fun getFrequencyInSeconds(humanFormat: String): Int? {
 fun checkFrequency(foundInConfig: String): Int {
     val frequencySeconds = getFrequencyInSeconds(foundInConfig)
     if (frequencySeconds == null) {
-        throw Exception("Invalid frequency value")
+        throw Exception("Invalid frequency value in config section 
nexus-ebics-submit: $foundInConfig")
     }
     if (frequencySeconds < 0) {
         throw Exception("Configuration error: cannot operate with a negative 
submit frequency ($foundInConfig)")
@@ -168,7 +168,6 @@ class EbicsSubmit : CliktCommand("Submits any initiated 
payment found in the dat
         "--config", "-c",
         help = "set the configuration file"
     )
-
     /**
      * Submits any initiated payment that was not submitted
      * so far and -- according to the configuration -- returns
@@ -179,16 +178,11 @@ class EbicsSubmit : CliktCommand("Submits any initiated 
payment found in the dat
         val frequency: Int = doOrFail {
             val configValue = cfg.config.requireString("nexus-ebics-submit", 
"frequency")
             return@doOrFail checkFrequency(configValue)
-
         }
         val dbCfg = cfg.config.extractDbConfigOrFail()
         val db = Database(dbCfg.dbConnStr)
         val httpClient = HttpClient()
-        val bankKeys = loadBankKeys(cfg.bankPublicKeysFilename)
-        if (bankKeys == null) {
-            logger.error("Could not find the bank keys at: 
${cfg.bankPublicKeysFilename}")
-            exitProcess(1)
-        }
+        val bankKeys = loadBankKeys(cfg.bankPublicKeysFilename) ?: 
exitProcess(1)
         if (!bankKeys.accepted) {
             logger.error("Bank keys are not accepted, yet.  Won't submit any 
payment.")
             exitProcess(1)

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]