File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
src/PlutusConfig/Cardano/Api Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ import Config.Schema (
2020 naturalSpec ,
2121 sectionsSpec ,
2222 )
23+ import Control.Exception (IOException , catch )
2324import Data.Aeson qualified as JSON
2425import Data.ByteString.Lazy qualified as LazyByteString
2526import Data.Default (def )
@@ -276,7 +277,7 @@ instance HasSpec ProtocolParameters where
276277 pure ProtocolParameters {.. }
277278
278279readProtocolParametersJSON :: FilePath -> IO (Either String ProtocolParameters )
279- readProtocolParametersJSON fn = JSON. eitherDecode <$> LazyByteString. readFile fn
280+ readProtocolParametersJSON fn = ( JSON. eitherDecode <$> LazyByteString. readFile fn) `catch` ( \ (e :: IOException ) -> pure $ Left ( show e))
280281
281282writeProtocolParametersJSON :: FilePath -> ProtocolParameters -> IO ()
282283writeProtocolParametersJSON fn params =
You can’t perform that action at this time.
0 commit comments