fixed error reporting
original commit: 7ab9526c21855ab623ee427bfdb94cd6c90e68e6
This commit is contained in:
parent
3b38ee00be
commit
04a3da9994
|
@ -12,8 +12,10 @@
|
|||
; send-url : str -> void
|
||||
(define send-url
|
||||
(opt-lambda (str [separate-window? separate-by-default?])
|
||||
; The with-handler reverts to the old error port before printing raised error messages.
|
||||
(with-handlers ([void (lambda (exn) (raise exn))])
|
||||
(parameterize ([current-input-port null-input]
|
||||
[current-error-port null-output] ; comment out this line to see error messages
|
||||
[current-error-port null-output]
|
||||
[current-output-port null-output])
|
||||
(cond
|
||||
[(eq? (system-type) 'macos)
|
||||
|
@ -61,7 +63,7 @@
|
|||
(process*/close-ports browser-path str))]
|
||||
[else
|
||||
(error 'open-url "Couldn't find Opera, Galeon, Mozilla, Netscape, or Dillo to open URL: ~e" str)]))]
|
||||
[else (error 'send-url "don't know how to open URL on platform: ~s" (system-type))]))))
|
||||
[else (error 'send-url "don't know how to open URL on platform: ~s" (system-type))])))))
|
||||
|
||||
; : sym sym -> (U #f str)
|
||||
; to find the path for the named browser, unless another browser is preferred
|
||||
|
|
Loading…
Reference in New Issue
Block a user