Dolda2000 GitWeb
/
doldaconnect.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
ee9bb4f
)
Improve error reporting in dc-qcmd.
author
Fredrik Tolf
<fredrik@dolda2000.com>
Tue, 4 Dec 2007 16:10:20 +0000
(17:10 +0100)
committer
Fredrik Tolf
<fredrik@dolda2000.com>
Tue, 4 Dec 2007 16:10:20 +0000
(17:10 +0100)
lib/guile/dolcon-guile.c
patch
|
blob
|
blame
|
history
diff --git
a/lib/guile/dolcon-guile.c
b/lib/guile/dolcon-guile.c
index
2b3de3b
..
e3e6db8
100644
(file)
--- a/
lib/guile/dolcon-guile.c
+++ b/
lib/guile/dolcon-guile.c
@@
-262,7
+262,17
@@
static SCM scm_dc_qcmd(SCM argv, SCM callback)
dc_freewcsarr(toks);
if(cmd != NULL)
free(cmd);
dc_freewcsarr(toks);
if(cmd != NULL)
free(cmd);
- return(scm_from_int(tag));
+ if(tag == -1) {
+ if(errno == ENOSYS) {
+ scm_error(scm_str2symbol("no-such-cmd"), "dc-qcmd", "Invalid command name", SCM_EOL, SCM_BOOL_F);
+ } else if(errno == EINVAL) {
+ scm_error(scm_str2symbol("illegal-escape"), "dc-qcmd", "Invalid escape sequence", SCM_EOL, SCM_BOOL_F);
+ } else {
+ scm_syserror("dc-qcmd");
+ }
+ } else {
+ return(scm_from_int(tag));
+ }
}
static void login_scmcb(int err, wchar_t *reason, struct scmcb *scmcb)
}
static void login_scmcb(int err, wchar_t *reason, struct scmcb *scmcb)