1. Bryan O'Sullivan
  2. configurator

Commits

Bryan O'Sullivan  committed d79eb79

More doc tweaks.

  • Participants
  • Parent commits c224e9a
  • Branches default

Comments (0)

Files changed (2)

File Data/Configurator.hs

View file
              , onError = const $ return ()
              }
 
--- | Load a 'Config' from the given 'FilePath's.
+-- | Load a 'Config' from the given 'FilePath's, and start a reload
+-- thread.
 --
 -- At intervals, a thread checks for modifications to both the
 -- original files and any files they refer to in @import@ directives,

File Data/Configurator/Types/Internal.hs

View file
     }
 
 -- | An action to be invoked if a configuration property is changed.
+--
+-- If this action is invoked and throws an exception, the 'onError'
+-- function will be called.
 type ChangeHandler = Name
                    -- ^ Name of the changed property.
                    -> Maybe Value
     -- ^ Interval (in seconds) at which to check for updates to config
     -- files.  The smallest allowed interval is one second.
     , onError :: SomeException -> IO ()
-    -- ^ Action invoked when an attempt to reload a 'Config' fails.
+    -- ^ Action invoked when an attempt to reload a 'Config' or notify
+    -- a 'ChangeHandler' causes an exception to be thrown.
+    --
     -- If this action rethrows its exception or throws a new
     -- exception, the modification checking thread will be killed.
+    -- You may want your application to treat that as a fatal error,
+    -- as its configuration may no longer be consistent.
     } deriving (Typeable)
 
 instance Show AutoConfig where