Skip to content

Commit

Permalink
renderer-gtk: Use handler-case instead of ignore-errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
aartaka authored and Ambrevar committed Jun 18, 2021
1 parent ee5b28c commit a583172
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions source/renderer-gtk.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -837,11 +837,12 @@ See `gtk-browser's `modifier-translator' slot."
(case (webkit:webkit-script-dialog-get-dialog-type dialog)
(:webkit-script-dialog-alert (echo (webkit:webkit-script-dialog-get-message dialog)))
(:webkit-script-dialog-prompt
(let ((text (first (ignore-errors
(prompt
:input (webkit:webkit-script-dialog-prompt-get-default-text dialog)
:prompt (webkit:webkit-script-dialog-get-message dialog)
:sources (list (make-instance 'prompter:raw-source)))))))
(let ((text (first (handler-case
(prompt
:input (webkit:webkit-script-dialog-prompt-get-default-text dialog)
:prompt (webkit:webkit-script-dialog-get-message dialog)
:sources (list (make-instance 'prompter:raw-source)))
(nyxt-prompt-buffer-canceled (c) (declare (ignore c)) nil)))))
(if text
(webkit:webkit-script-dialog-prompt-set-text dialog text)
(progn
Expand Down

0 comments on commit a583172

Please sign in to comment.