[cl-selenium-devel] Better error handling, please.
Robin Lee Powell
rlpowell at digitalkingdom.org
Wed Oct 15 00:59:11 UTC 2008
On Thu, Oct 02, 2008 at 01:27:53PM -0700, Robin Lee Powell wrote:
>
> cl-selenium's response to me having forgotten to start
> selenium-server is:
>
> debugger invoked on a SIMPLE-ERROR in thread #<THREAD "initial thread" RUNNING {100266AE01}>:
> Error during processing of --eval option (LOAD #P"sert-spec.cl"):
>
> end of file on #<FLEXI-STREAMS:FLEXI-IO-STREAM {1004DE1851}>
>
> Could that maybe be a little less opaque? :)
Did it myself:
*** cl-selenium-0.4-orig/iedoc.lisp 2008-10-14 17:27:36.000000000 -0700
--- cl-selenium-0.4/iedoc.lisp 2008-10-14 17:58:25.000000000 -0700
***************
*** 150,155 ****
--- 150,156 ----
(description c)))))
(defun execute (url parameters &optional return-type)
+ (handler-case
(multiple-value-bind (reply status-code headers reply-from stream some-bool reason)
(drakma:http-request url :method :get :parameters parameters)
(declare (ignore headers reply-from stream some-bool))
***************
*** 160,166 ****
(convert-result (subseq reply (min 3 (length reply))) return-type))
((starts-with reply "ERROR:")
(let ((err (second (split-sequence:split-sequence #\: reply))))
! (error 'execution-error :description err))))))
(defun convert-function (iedoc-function)
(let ((function-name (convert-function-name (iedoc-function-name iedoc-function)))
--- 161,169 ----
(convert-result (subseq reply (min 3 (length reply))) return-type))
((starts-with reply "ERROR:")
(let ((err (second (split-sequence:split-sequence #\: reply))))
! (error 'execution-error :description err)))))
! (error (cond-val)
! (error "Selenium RC can't talk to the Selenium server; is it running?~%~% Specific error: ~A~%~%" cond-val))))
(defun convert-function (iedoc-function)
(let ((function-name (convert-function-name (iedoc-function-name iedoc-function)))
-Robin
--
They say: "The first AIs will be built by the military as weapons."
And I'm thinking: "Does it even occur to you to try for something
other than the default outcome?" -- http://shorl.com/tydruhedufogre
http://www.digitalkingdom.org/~rlpowell/ *** http://www.lojban.org/
More information about the cl-selenium-devel
mailing list