diff --git a/ConfigFile.cabal b/ConfigFile.cabal
--- a/ConfigFile.cabal
+++ b/ConfigFile.cabal
@@ -1,5 +1,5 @@
 Name: ConfigFile
-Version: 1.1.1
+Version: 1.1.2
 License: LGPL
 Maintainer: John Goerzen <jgoerzen@complete.org>
 Author: John Goerzen
diff --git a/src/Data/ConfigFile.hs b/src/Data/ConfigFile.hs
--- a/src/Data/ConfigFile.hs
+++ b/src/Data/ConfigFile.hs
@@ -430,8 +430,19 @@
 instance Read t => Get_C t where
     get = genericget
 
+-- Based on code from Neil Mitchell's safe-0.3.3 package.
+readMaybe :: Read a => String -> Maybe a
+readMaybe s = case [x | (x, t) <- reads s, ("","") <- lex t] of
+                [x] -> Just x
+                _   -> Nothing
+
 genericget :: (Read b, MonadError CPError m) => ConfigParser -> SectionSpec -> OptionSpec -> m b
-genericget cp s o = get cp s o >>= return . read
+genericget cp s o = do
+    val <- get cp s o
+    let errMsg = "couldn't parse value " ++ val ++ " from " ++ formatSO s o
+    maybe (throwError (ParseError errMsg, "genericget"))
+          return
+          $ readMaybe val
 
 getbool ::  MonadError CPError m =>
             ConfigParser -> SectionSpec -> OptionSpec -> m Bool
@@ -797,7 +808,7 @@
 >main = do
 >          rv <- runErrorT $
 >              do
->              cp <- join $ liftIO $ readfile empty "/etc/passwd"
+>              cp <- join $ liftIO $ readfile emptyCP "/etc/passwd"
 >              let x = cp
 >              liftIO $ putStrLn "In the test"
 >              nb <- get x "DEFAULT" "nobody"
