mirror of
https://github.com/dhall-lang/dhall-kubernetes.git
synced 2024-09-17 10:27:08 +03:00
Replace error with fail
This commit is contained in:
parent
02328e146b
commit
7670b516c8
@ -130,12 +130,12 @@ main = do
|
||||
if crd then do
|
||||
crdFile <- decodeFileEither filename
|
||||
case crdFile of
|
||||
Left e -> error $ "Unable to decode the CRD file. " <> show e
|
||||
Left e -> fail $ "Unable to decode the CRD file. " <> show e
|
||||
Right s -> (pure . Data.Map.fromList . maybeToList . Convert.toDefinition) s
|
||||
else do
|
||||
swaggerFile <- decodeFileStrict filename
|
||||
case swaggerFile of
|
||||
Nothing -> error "Unable to decode the Swagger file"
|
||||
Nothing -> fail "Unable to decode the Swagger file"
|
||||
Just (Swagger{..}) -> pure definitions
|
||||
|
||||
let fix m = Data.Map.adjust patchCyclicImports (ModelName m)
|
||||
|
Loading…
Reference in New Issue
Block a user