File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
cardano-testnet/src/Testnet Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -60,6 +60,7 @@ import Testnet.Types (TestnetNode (..), TestnetRuntime (configurationF
6060import Hedgehog.Extras.Stock.IO.Network.Sprocket (Sprocket (.. ))
6161import qualified Hedgehog.Extras.Stock.IO.Network.Sprocket as H
6262import qualified Hedgehog.Extras.Test.Concurrent as H
63+ import RIO.Directory (doesFileExist )
6364
6465data NodeStartFailure
6566 = ProcessRelatedFailure ProcessError
@@ -343,8 +344,11 @@ startLedgerNewEpochStateLogging testnetRuntime tmpWorkspace = withFrozenCallStac
343344 -- | Handle all sync exceptions and log them into the log file. We don't want to fail the test just
344345 -- because logging has failed.
345346 handleException = handle $ \ (e :: SomeException ) -> do
346- liftIOAnnotated $ appendFile outputFp $ " Ledger new epoch logging failed - caught exception:\n "
347- <> displayException e <> " \n "
347+ exists <- doesFileExist outputFp
348+ if exists
349+ then liftIOAnnotated $ appendFile outputFp $ " Ledger new epoch logging failed - caught exception:\n "
350+ <> displayException e <> " \n "
351+ else error $ " File does not exist: " <> outputFp
348352 pure ConditionMet
349353
350354calculateEpochStateDiff
You can’t perform that action at this time.
0 commit comments