I am testing my code and run the function below against a non-existent
mysql server:
Hmm - thought that try should catch this but apparently other things=
happen:
mysql-query: function [ {Either returns [["ERROR"]], [["EMPTY"]] or [[=
<cursor> ]]}
querystr [string!] statusbar [object! none!]] [=
cursor ] [
print "about to open port"
mysql-error: try [
mysqlport: open mysql-url
cursor: send-sql mysqlport querystr
close mysqlport
false ; no error if we get here!
]
either error? mysql-error [
probe mysql-error
mysql-error: disarm mysql-error
if statusbar <> none [ stat-upd sbar reform [=
"MySQL-Connection error: " mysql-error/arg1 ]]
return [["ERROR"]]
]
[ either cursor =3D []
[ return [[ "EMPTY" ]] ]
[ return cursor ] =
]
]
about to open port
** Access Error: Cannot connect to 192.168.1.220
** Where: open-proto
** Near: mysqlport: open mysql-url
cursor: send-sql
>>
Can someone fill me in how that's possible?
Thanks
Kai
--
To unsubscribe from the list, just send an email to
lists at rebol.com with unsubscribe as the subject.