[Commit] rrserver dispatch.5c,1.19,1.20 readreq.5c,1.10,1.11
Keith Packard
commit at keithp.com
Thu Jun 5 09:09:13 PDT 2003
Committed by: keithp
Update of /local/src/CVS/rrserver
In directory home.keithp.com:/tmp/cvs-serv29768
Modified Files:
dispatch.5c readreq.5c
Log Message:
Convert no_such_game and syntax exceptions into rr_error exceptions
Index: dispatch.5c
===================================================================
RCS file: /local/src/CVS/rrserver/dispatch.5c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- dispatch.5c 3 Jun 2003 08:02:54 -0000 1.19
+++ dispatch.5c 5 Jun 2003 15:09:11 -0000 1.20
@@ -584,6 +584,8 @@
}
if (i == dim(commands))
raise rr_error (Error.COMMAND);
+ } catch Games::no_such_game (string name) {
+ raise rr_error (Error.NOGAME);
} catch rr_error (Error e) {
respond ("ERROR %E\n", e);
} catch closed () {
Index: readreq.5c
===================================================================
RCS file: /local/src/CVS/rrserver/readreq.5c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- readreq.5c 3 Jun 2003 08:02:54 -0000 1.10
+++ readreq.5c 5 Jun 2003 15:09:11 -0000 1.11
@@ -50,9 +50,13 @@
}
public string[] read (file f) {
- twixt (unlock (); lock ())
- twixt (true; skipline (f))
- return read_unlocked (f);
+ try {
+ twixt (unlock (); lock ())
+ twixt (true; skipline (f))
+ return read_unlocked (f);
+ } catch syntax () {
+ raise rr_error (Error.SYNTAX);
+ }
raise notreached ();
}
}
More information about the Commit
mailing list