Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

problem with if error? try [block] [block]

 [1/2] from: dougedmunds:g:mail at: 18-Apr-2008 12:28


Hello, I send a binary (bin_out) to a server (remote) which is supposed to send back a reply If the out-going binary is malformed, it causes the server to crash. The code below writes to a log when that happens. (The Rebol window and Rebol console always immediately after that). The problem is that I can't get the second part of the try statement (starting with [wait 2] to work, unless there has been at least one successful run-through of the first part (the 'wait remote' part). Is this a bug with try? -- Doug Edmunds ---start--- ;(connection already opened) insert remote bin_out if error? try [wait remote] [wait 2 print "Server crashed. See crash.txt" error_msg: reform [now {Server crashed} bin_out ] write/lines/append %crash.txt error_msg ] ;(get data from server) bin_in: copy remote [] --- end---

 [2/2] from: compkarori::gmail at: 19-Apr-2008 8:07


http://www.rebol.com/docs/core23/rebolcore-14.html#section-7 I'd wait on a port with a timeout value. On Sat, Apr 19, 2008 at 7:28 AM, DougEdmunds <dougedmunds-gmail.com> wrote:
> Hello, > I send a binary (bin_out) to a server (remote) which
<<quoted lines omitted: 27>>
> To unsubscribe from the list, just send an email to > lists at rebol.com with unsubscribe as the subject.
-- Graham Chiu http://www.synapsedirect.com Synapse - the use from anywhere EMR.

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted