summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbringert <bringert@cs.chalmers.se>2007-03-24 17:26:21 +0000
committerbringert <bringert@cs.chalmers.se>2007-03-24 17:26:21 +0000
commit61456fd9ca6189a689ac0911f0e7260ce86e76d0 (patch)
tree2ff2a4aa1fd3f07cfb95bd8b595b4b3af1584f67 /src
parent2885cfc5ac2c3e58754d1938c144c5b3b8cd95f6 (diff)
Better debugging output when SRG generation crashes because of a missing category.
Diffstat (limited to 'src')
-rw-r--r--src/GF/Speech/SRG.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/GF/Speech/SRG.hs b/src/GF/Speech/SRG.hs
index 995eb3b2e..8c3c5e02c 100644
--- a/src/GF/Speech/SRG.hs
+++ b/src/GF/Speech/SRG.hs
@@ -185,7 +185,9 @@ ungroupTokens = joinRE . mapRE (symbol (RESymbol . Cat) (REConcat . map (RESymbo
--
lookupFM_ :: (Ord key, Show key) => Map key elt -> key -> elt
-lookupFM_ fm k = Map.findWithDefault (error $ "Key not found: " ++ show k) k fm
+lookupFM_ fm k = Map.findWithDefault err k fm
+ where err = error $ "Key not found: " ++ show k
+ ++ "\namong " ++ show (Map.keys fm)
prtS :: Print a => a -> ShowS
prtS = showString . prt \ No newline at end of file