add some code to help avoid drracket dying when the sandbox does strange things
This commit is contained in:
parent
d2d82d325b
commit
e4887f576d
|
@ -105,7 +105,14 @@
|
|||
(define (init-sandbox)
|
||||
(unless sandbox
|
||||
(when language-info
|
||||
(set! sandbox (make-evaluator 'racket/base)))))
|
||||
;; creating a sanbox can fail in strange ways so we just
|
||||
;; swallow the failures so as to not wreck DrRacket
|
||||
(with-handlers ((exn:fail? (λ (x)
|
||||
(log-error (exn-message x))
|
||||
(for ([x (in-list (continuation-mark-set->context
|
||||
(exn-continuation-marks x)))])
|
||||
(log-error (format " ~s" x))))))
|
||||
(set! sandbox (make-evaluator 'racket/base))))))
|
||||
|
||||
(define/override (first-opened settings)
|
||||
(define ns (with-handlers ((exn:fail? (lambda (x) #f)))
|
||||
|
|
Loading…
Reference in New Issue
Block a user