|
From: Samuel L. B. <sa...@mi...> - 2002-05-06 20:13:05
|
Hi, it's me again
Hi.
The first is when i call the server with no args it should exit and
print the usage line and it doesn't... And i have three arguments. It
prints if a use only one agrument in all other cases except if i don't
give any args. This is not a big problem i made a test to the value
of argc.
I'll need to see more of the code. If you're writing your own main(),
it can be a little tricky how the argument parsing works. If you can
tell me what specific command line invocations aren't doing what you
expect, that would help.
The next and more challenging one is, when i send a message to the hub
and this message should produce an error, like an operation that does,t
exist, i receive the same message i sent, and i wanted to receive the
error message which i see in the hub pane.
[...]
(ERROR:
------ System Warning/Error ------
)
{c system_error
:server_unavailable 1
:operation "k"
:server_name "Echo"
:session_id "Default"
:tidx 2 }
(ERROR: ------------------------------------
)
[Destroying token 2]
tokens: 1 (0)
done with token 1 --> returning to owner UI@<remote>:-1
[Destroying token 1]
[...]
This one's pretty straightforward, but I don't think you'll like the
answer much. When the Hub can't find an operation, it doesn't raise an
error in the token which the operation represents; instead, it creates
a new token which describes the error. The token which contains the
unrecognized operation is untouched. I have to agree that this seems a
little bizarre, but this particular dimension of error handling was
established before I took over the maintenance of the code, and I
somehow doubt that changing it would be very well received. So the
short answer is, you can't directly capture this error.
The worst part about it is that if you're trying to send messages
directly, without using the Hub scripting, I can't think of any way
for you to capture the error at all. Oops. Is this a bug? Probably. If
you try to send an unrecognized message from the Hub to a server, the
server will raise an error as the response.
Unfortunately, I don't think I can fix this for version 4.0.
Sorry,
Sam
|