hack: use a special value with exit to avoid popup message (no need for it now)
svn: r10317
This commit is contained in:
parent
b6827d2d0b
commit
2c94de20aa
|
@ -220,7 +220,8 @@
|
||||||
(queue-callback
|
(queue-callback
|
||||||
(λ ()
|
(λ ()
|
||||||
(fprintf (current-error-port) "\n(Further interactions disabled.)\n")
|
(fprintf (current-error-port) "\n(Further interactions disabled.)\n")
|
||||||
(kill-thread t)))
|
;; special value that will exit the repl but avoid the popup
|
||||||
|
(exit "NO NEED TO POPUP A TERMINATION EXPLANATION")))
|
||||||
(apply raise-syntax-error '|Module Language|
|
(apply raise-syntax-error '|Module Language|
|
||||||
(if (null? error-args)
|
(if (null? error-args)
|
||||||
(list (string-append
|
(list (string-append
|
||||||
|
|
|
@ -903,12 +903,17 @@ TODO
|
||||||
|
|
||||||
(field (already-warned? #f))
|
(field (already-warned? #f))
|
||||||
|
|
||||||
|
;; special value that is used with `exit' when we don't want the popup
|
||||||
|
(define no-terminate-explanation-string
|
||||||
|
"NO NEED TO POPUP A TERMINATION EXPLANATION")
|
||||||
|
|
||||||
(define/private (cleanup)
|
(define/private (cleanup)
|
||||||
(set! in-evaluation? #f)
|
(set! in-evaluation? #f)
|
||||||
(update-running #f)
|
(update-running #f)
|
||||||
(unless (and (get-user-thread) (thread-running? (get-user-thread)))
|
(unless (and (get-user-thread) (thread-running? (get-user-thread)))
|
||||||
(lock #t)
|
(lock #t)
|
||||||
(unless shutting-down?
|
(unless (or shutting-down?
|
||||||
|
(equal? user-exit-code no-terminate-explanation-string))
|
||||||
(no-user-evaluation-message
|
(no-user-evaluation-message
|
||||||
(let ([canvas (get-active-canvas)])
|
(let ([canvas (get-active-canvas)])
|
||||||
(and canvas
|
(and canvas
|
||||||
|
@ -1227,8 +1232,8 @@ TODO
|
||||||
(queue-callback
|
(queue-callback
|
||||||
(λ ()
|
(λ ()
|
||||||
(set! user-exit-code
|
(set! user-exit-code
|
||||||
(if (and (integer? x)
|
(if (or (and (integer? x) (<= 0 x 255))
|
||||||
(<= 0 x 255))
|
(equal? x no-terminate-explanation-string))
|
||||||
x
|
x
|
||||||
0))
|
0))
|
||||||
(semaphore-post s))))
|
(semaphore-post s))))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user