@@ -62,6 +62,7 @@ data ParseException = NonScalarKey
62 | OtherParseException SomeException
62 | OtherParseException SomeException
63 | NonStringKeyAlias Y.AnchorName Value
63 | NonStringKeyAlias Y.AnchorName Value
64 | CyclicIncludes
64 | CyclicIncludes
65+ | LoadSettingsException FilePath ParseException
65 deriving (Show, Typeable)
66 deriving (Show, Typeable)
67instance Exception ParseException where
68instance Exception ParseException where
@@ -113,6 +114,7 @@ prettyPrintParseException pe = case pe of
113 , " Value: " ++ show value
114 , " Value: " ++ show value
115 CyclicIncludes -> "Cyclic includes"
116 CyclicIncludes -> "Cyclic includes"
117+ LoadSettingsException fp exc -> "Could not parse file as YAML: " ++ fp ++ "\n" ++ prettyPrintParseException exc
117defineAnchor :: Value -> String -> ReaderT JSONPath (ConduitM e o Parse) ()
119defineAnchor :: Value -> String -> ReaderT JSONPath (ConduitM e o Parse) ()
118defineAnchor value name = modify (modifyAnchors $ Map.insert name value)
120defineAnchor value name = modify (modifyAnchors $ Map.insert name value)