mirror of
https://github.com/bitcoin-s/bitcoin-s.git
synced 2025-03-15 20:30:17 +01:00
Add error messages for when DLC GUI functions timeout (#3184)
This commit is contained in:
parent
5a79acb59c
commit
bcda2467ef
1 changed files with 15 additions and 3 deletions
|
@ -115,7 +115,11 @@ class DLCPaneModel(resultArea: TextArea) extends Logging {
|
||||||
op = {
|
op = {
|
||||||
ConsoleCli.exec(command, GlobalData.consoleCliConfig) match {
|
ConsoleCli.exec(command, GlobalData.consoleCliConfig) match {
|
||||||
case Success(commandReturn) =>
|
case Success(commandReturn) =>
|
||||||
resultArea.text = commandReturn
|
val string = if (commandReturn.isEmpty) {
|
||||||
|
"Accepting DLC Offer timed out! Try again in a bit."
|
||||||
|
} else commandReturn
|
||||||
|
|
||||||
|
resultArea.text = string
|
||||||
case Failure(err) =>
|
case Failure(err) =>
|
||||||
err.printStackTrace()
|
err.printStackTrace()
|
||||||
resultArea.text = s"Error executing command:\n${err.getMessage}"
|
resultArea.text = s"Error executing command:\n${err.getMessage}"
|
||||||
|
@ -137,7 +141,10 @@ class DLCPaneModel(resultArea: TextArea) extends Logging {
|
||||||
op = {
|
op = {
|
||||||
ConsoleCli.exec(command, GlobalData.consoleCliConfig) match {
|
ConsoleCli.exec(command, GlobalData.consoleCliConfig) match {
|
||||||
case Success(commandReturn) =>
|
case Success(commandReturn) =>
|
||||||
resultArea.text = commandReturn
|
val string = if (commandReturn.isEmpty) {
|
||||||
|
"Signing DLC timed out! Try again in a bit."
|
||||||
|
} else commandReturn
|
||||||
|
resultArea.text = string
|
||||||
case Failure(err) =>
|
case Failure(err) =>
|
||||||
err.printStackTrace()
|
err.printStackTrace()
|
||||||
resultArea.text = s"Error executing command:\n${err.getMessage}"
|
resultArea.text = s"Error executing command:\n${err.getMessage}"
|
||||||
|
@ -150,7 +157,12 @@ class DLCPaneModel(resultArea: TextArea) extends Logging {
|
||||||
}
|
}
|
||||||
|
|
||||||
def onAddSigs(): Unit = {
|
def onAddSigs(): Unit = {
|
||||||
printDLCDialogResult("AddDLCSigs", new AddSigsDLCDialog)
|
val processStr: String => String = str => {
|
||||||
|
if (str.isEmpty) {
|
||||||
|
"Broadcasting DLC timed out! Try again in a bit."
|
||||||
|
} else str
|
||||||
|
}
|
||||||
|
printDLCDialogResult("AddDLCSigs", new AddSigsDLCDialog, processStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
def onGetFunding(): Unit = {
|
def onGetFunding(): Unit = {
|
||||||
|
|
Loading…
Add table
Reference in a new issue