gnunet-svn
[Top][All Lists]
Advanced

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

[libeufin] branch master updated: fix error handling


From: gnunet
Subject: [libeufin] branch master updated: fix error handling
Date: Mon, 21 Feb 2022 09:25:59 +0100

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 f280a2ea fix error handling
f280a2ea is described below

commit f280a2ea9cd8e253919fd0d15df5e885c1decda9
Author: MS <ms@taler.net>
AuthorDate: Mon Feb 21 09:25:48 2022 +0100

    fix error handling
---
 util/src/main/kotlin/amounts.kt | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/util/src/main/kotlin/amounts.kt b/util/src/main/kotlin/amounts.kt
index da5e43eb..327bcbd4 100644
--- a/util/src/main/kotlin/amounts.kt
+++ b/util/src/main/kotlin/amounts.kt
@@ -1,5 +1,6 @@
 package tech.libeufin.util
 
+import UtilError
 import io.ktor.http.*
 
 /*
@@ -29,7 +30,7 @@ fun validatePlainAmount(plainAmount: String): Boolean {
 
 fun parseAmount(amount: String): AmountWithCurrency {
     val match = Regex("([A-Z]+):([0-9]+(\\.[0-9]+)?)").find(amount) ?: throw
-    EbicsProtocolError(HttpStatusCode.BadRequest, "invalid amount: $amount")
+    UtilError(HttpStatusCode.BadRequest, "invalid amount: $amount")
     val (currency, number) = match.destructured
     return AmountWithCurrency(currency, Amount(number))
 }

-- 
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]