remove sys err exception logging

This commit is contained in:
Craig Raw 2020-08-17 17:00:48 +02:00
parent e1934c99bc
commit 304bdd5c48
4 changed files with 15 additions and 4 deletions

View file

@ -4,8 +4,12 @@ import javafx.scene.Node;
import javafx.scene.control.Label; import javafx.scene.control.Label;
import javafx.scene.image.ImageView; import javafx.scene.image.ImageView;
import javafx.scene.layout.Region; import javafx.scene.layout.Region;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class WebcamView { public class WebcamView {
private static final Logger log = LoggerFactory.getLogger(WebcamView.class);
private final ImageView imageView; private final ImageView imageView;
private final WebcamService service; private final WebcamService service;
private final Region view; private final Region view;
@ -47,7 +51,7 @@ public class WebcamView {
imageView.imageProperty().unbind(); imageView.imageProperty().unbind();
statusPlaceholder.setText("Error"); statusPlaceholder.setText("Error");
getChildren().setAll(statusPlaceholder); getChildren().setAll(statusPlaceholder);
service.getException().printStackTrace(); log.error("Failed to start web cam", service.getException());
break; break;
case SUCCEEDED: case SUCCEEDED:
// unreachable... // unreachable...

View file

@ -693,6 +693,9 @@ public class HeadersController extends TransactionFormController implements Init
if(headersForm.getSigningWallet() instanceof FinalizingPSBTWallet) { if(headersForm.getSigningWallet() instanceof FinalizingPSBTWallet) {
//Ensure the script hashes of the UTXOs in FinalizingPSBTWallet are subscribed to //Ensure the script hashes of the UTXOs in FinalizingPSBTWallet are subscribed to
ElectrumServer.TransactionHistoryService historyService = new ElectrumServer.TransactionHistoryService(headersForm.getSigningWallet()); ElectrumServer.TransactionHistoryService historyService = new ElectrumServer.TransactionHistoryService(headersForm.getSigningWallet());
historyService.setOnFailed(workerStateEvent -> {
log.error("Error subscribing FinalizingPSBTWallet script hashes", workerStateEvent.getSource().getException());
});
historyService.start(); historyService.start();
} }
@ -702,6 +705,7 @@ public class HeadersController extends TransactionFormController implements Init
}); });
broadcastTransactionService.setOnFailed(workerStateEvent -> { broadcastTransactionService.setOnFailed(workerStateEvent -> {
broadcastProgressBar.setProgress(0); broadcastProgressBar.setProgress(0);
log.error("Error broadcasting transaction", workerStateEvent.getSource().getException());
AppController.showErrorDialog("Error broadcasting transaction", workerStateEvent.getSource().getException().getMessage()); AppController.showErrorDialog("Error broadcasting transaction", workerStateEvent.getSource().getException().getMessage());
broadcastButton.setDisable(false); broadcastButton.setDisable(false);
}); });
@ -901,6 +905,9 @@ public class HeadersController extends TransactionFormController implements Init
updateBlockchainForm(blockTransaction, AppController.getCurrentBlockHeight()); updateBlockchainForm(blockTransaction, AppController.getCurrentBlockHeight());
} }
}); });
transactionReferenceService.setOnSucceeded(failEvent -> {
log.error("Could not update block transaction", failEvent.getSource().getException());
});
transactionReferenceService.start(); transactionReferenceService.start();
} }
} }

View file

@ -340,7 +340,7 @@ public class TransactionController implements Initializable {
}); });
}); });
transactionReferenceService.setOnFailed(failedEvent -> { transactionReferenceService.setOnFailed(failedEvent -> {
failedEvent.getSource().getException().printStackTrace(); log.error("Error fetching transaction or input references", failedEvent.getSource().getException());
}); });
transactionReferenceService.start(); transactionReferenceService.start();
} }
@ -357,7 +357,7 @@ public class TransactionController implements Initializable {
}); });
}); });
transactionOutputsReferenceService.setOnFailed(failedEvent -> { transactionOutputsReferenceService.setOnFailed(failedEvent -> {
failedEvent.getSource().getException().printStackTrace(); log.error("Error fetching transaction output references", failedEvent.getSource().getException());
}); });
transactionOutputsReferenceService.start(); transactionOutputsReferenceService.start();
} }

View file

@ -71,7 +71,7 @@ public class WalletForm {
updateWallet(previousWallet, blockHeight); updateWallet(previousWallet, blockHeight);
}); });
historyService.setOnFailed(workerStateEvent -> { historyService.setOnFailed(workerStateEvent -> {
workerStateEvent.getSource().getException().printStackTrace(); log.error("Error retrieving wallet history", workerStateEvent.getSource().getException());
}); });
historyService.start(); historyService.start();
} }