File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
cardano-testnet/src/Testnet Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -333,7 +333,16 @@ startLedgerNewEpochStateLogging testnetRuntime tmpWorkspace = withFrozenCallStac
333333 -- | Handle all sync exceptions and log them into the log file. We don't want to fail the test just
334334 -- because logging has failed.
335335 handleException = handle $ \ (e :: SomeException ) -> do
336- liftIOAnnotated $ appendFile outputFp $ " Ledger new epoch logging failed - caught exception:\n "
336+ exists <- liftIO $ IO. doesFileExist outputFp
337+ if exists
338+ then liftIOAnnotated $ appendFile outputFp $ " Ledger new epoch logging failed - caught exception:\n "
339+ <> displayException e <> " \n "
340+ else
341+ liftIO $ writeFile outputFp $ unlines
342+ [" Ledger new epoch logging failed - caught exception:"
343+ , displayException e
344+ ]
345+ liftIO $ appendFile outputFp $ " Ledger new epoch logging failed - caught exception:\n "
337346 <> displayException e <> " \n "
338347 pure ConditionMet
339348
You can’t perform that action at this time.
0 commit comments