File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
cardano-testnet/src/Testnet Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -343,8 +343,15 @@ startLedgerNewEpochStateLogging testnetRuntime tmpWorkspace = withFrozenCallStac
343343 -- | Handle all sync exceptions and log them into the log file. We don't want to fail the test just
344344 -- because logging has failed.
345345 handleException = handle $ \ (e :: SomeException ) -> do
346- liftIOAnnotated $ appendFile outputFp $ " Ledger new epoch logging failed - caught exception:\n "
347- <> displayException e <> " \n "
346+ exists <- liftIO $ IO. doesFileExist outputFp
347+ if exists
348+ then liftIOAnnotated $ appendFile outputFp $ " Ledger new epoch logging failed - caught exception:\n "
349+ <> displayException e <> " \n "
350+ else do
351+ liftIO $ writeFile outputFp $ unlines
352+ [" Ledger new epoch logging failed - caught exception:"
353+ , displayException e
354+ ]
348355 pure ConditionMet
349356
350357calculateEpochStateDiff
You can’t perform that action at this time.
0 commit comments