projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1a8ef59
)
[project @ 1998-08-14 13:06:56 by sof]
author
sof
<unknown>
Fri, 14 Aug 1998 13:07:13 +0000
(13:07 +0000)
committer
sof
<unknown>
Fri, 14 Aug 1998 13:07:13 +0000
(13:07 +0000)
Better error messages
ghc/lib/posix/PosixDB.lhs
patch
|
blob
|
history
ghc/lib/posix/PosixFiles.lhs
patch
|
blob
|
history
diff --git
a/ghc/lib/posix/PosixDB.lhs
b/ghc/lib/posix/PosixDB.lhs
index
2952c05
..
035998c
100644
(file)
--- a/
ghc/lib/posix/PosixDB.lhs
+++ b/
ghc/lib/posix/PosixDB.lhs
@@
-46,7
+46,7
@@
getGroupEntryForID gid =
_ccall_ getgrgid gid >>= \ ptr ->
if ptr == (``NULL'' :: Addr) then
fail (IOError Nothing NoSuchThing
_ccall_ getgrgid gid >>= \ ptr ->
if ptr == (``NULL'' :: Addr) then
fail (IOError Nothing NoSuchThing
- "getGroupEntryForID: no such group entry")
+ "getGroupEntryForID" "no such group entry")
else
unpackGroupEntry ptr
else
unpackGroupEntry ptr
@@
-56,7
+56,7
@@
getGroupEntryForName name =
_ccall_ getgrnam gname >>= \ ptr ->
if ptr == (``NULL'' :: Addr) then
fail (IOError Nothing NoSuchThing
_ccall_ getgrnam gname >>= \ ptr ->
if ptr == (``NULL'' :: Addr) then
fail (IOError Nothing NoSuchThing
- "getGroupEntryForName: no such group entry")
+ "getGroupEntryForName" "no such group entry")
else
unpackGroupEntry ptr
else
unpackGroupEntry ptr
@@
-65,7
+65,7
@@
getUserEntryForID uid =
_ccall_ getpwuid uid >>= \ ptr ->
if ptr == ``NULL'' then
fail (IOError Nothing NoSuchThing
_ccall_ getpwuid uid >>= \ ptr ->
if ptr == ``NULL'' then
fail (IOError Nothing NoSuchThing
- "getUserEntryForID: no such user entry")
+ "getUserEntryForID" "no such user entry")
else
unpackUserEntry ptr
else
unpackUserEntry ptr
@@
-75,7
+75,7
@@
getUserEntryForName name =
_ccall_ getpwnam uname >>= \ ptr ->
if ptr == ``NULL'' then
fail (IOError Nothing NoSuchThing
_ccall_ getpwnam uname >>= \ ptr ->
if ptr == ``NULL'' then
fail (IOError Nothing NoSuchThing
- "getUserEntryForName: no such user entry")
+ "getUserEntryForName" "no such user entry")
else
unpackUserEntry ptr
\end{code}
else
unpackUserEntry ptr
\end{code}
diff --git
a/ghc/lib/posix/PosixFiles.lhs
b/ghc/lib/posix/PosixFiles.lhs
index
07d01ab
..
5754a23
100644
(file)
--- a/
ghc/lib/posix/PosixFiles.lhs
+++ b/
ghc/lib/posix/PosixFiles.lhs
@@
-128,7
+128,7
@@
readDirStream dirp = do
else do
errno <- getErrorCode
if errno == noError
else do
errno <- getErrorCode
if errno == noError
- then fail (IOError Nothing EOF "EOF")
+ then fail (IOError Nothing EOF "readDirStream" "EOF")
else syserr "readDirStream"
rewindDirStream :: DirStream -> IO ()
else syserr "readDirStream"
rewindDirStream :: DirStream -> IO ()
@@
-529,7
+529,7
@@
pathconf n name = do
else do
errno <- getErrorCode
if errno == invalidArgument
else do
errno <- getErrorCode
if errno == invalidArgument
- then fail (IOError Nothing NoSuchThing "PosixFiles.getPathVar: no such path limit or option")
+ then fail (IOError Nothing NoSuchThing "getPathVar" "no such path limit or option")
else syserr "PosixFiles.getPathVar"
else syserr "PosixFiles.getPathVar"
@@
-553,7
+553,7
@@
fpathconf n fd = do
else do
errno <- getErrorCode
if errno == invalidArgument
else do
errno <- getErrorCode
if errno == invalidArgument
- then fail (IOError Nothing NoSuchThing "getFileVar: no such path limit or option")
+ then fail (IOError Nothing NoSuchThing "getFileVar" "no such path limit or option")
else syserr "getFileVar"
\end{code}
else syserr "getFileVar"
\end{code}