In R3 Corda, how to show error message when we trigger flow from command prompt?

27 Views Asked by At

I want to show the error message in command prompt with this code:

public SignedTransaction call() throws FlowException {
            Party centralBank = getServiceHub().getNetworkMapCache().getPeerByLegalName(CordaX500Name.parse("O=CBANK, L=Jakarta, C=ID"));

            assert centralBank != null;
            if (!getOurIdentity().getOwningKey().equals(centralBank.getOwningKey())) {
                throw new FlowException("Issuance must be triggered from Central Bank.");
            }

            ....
}

But when the FlowException is triggered, the error message didn't show up in the command prompt. Any advice? Thank you.

1

There are 1 best solutions below

0
On

The node shell terminal is not intended to be used in production. All of the error messages are outputed to the logs.