Commit c08d8ef0 authored by Ian Lynagh's avatar Ian Lynagh
Browse files

When (un)loading an object fails, say which object in teh panic

parent 1f9d7d4f
......@@ -69,13 +69,13 @@ loadObj :: String -> IO ()
loadObj str = do
withCString str $ \c_str -> do
r <- c_loadObj c_str
when (r == 0) (panic "loadObj: failed")
when (r == 0) (panic ("loadObj " ++ show str ++ ": failed"))
unloadObj :: String -> IO ()
unloadObj str =
withCString str $ \c_str -> do
r <- c_unloadObj c_str
when (r == 0) (panic "unloadObj: failed")
when (r == 0) (panic ("unloadObj " ++ show str ++ ": failed"))
resolveObjs :: IO SuccessFlag
resolveObjs = do
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment