js-on-sx: object literal __proto__ + try/catch error wrapping
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 36s
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 36s
This commit is contained in:
@@ -1407,7 +1407,28 @@
|
||||
(let
|
||||
((body-tr (js-transpile body)))
|
||||
(let
|
||||
((with-catch (cond ((= catch-part nil) body-tr) (else (let ((pname (nth catch-part 0)) (cbody (nth catch-part 1))) (list (js-sym "guard") (list (if (= pname nil) (js-sym "__exc__") (js-sym pname)) (list (js-sym "else") (js-transpile cbody))) body-tr))))))
|
||||
((with-catch
|
||||
(cond
|
||||
((= catch-part nil) body-tr)
|
||||
(else
|
||||
(let
|
||||
((pname (nth catch-part 0))
|
||||
(cbody (nth catch-part 1))
|
||||
(raw-sym (js-sym "__raw_exc__")))
|
||||
(list
|
||||
(js-sym "guard")
|
||||
(list
|
||||
raw-sym
|
||||
(list
|
||||
(js-sym "else")
|
||||
(cond
|
||||
((= pname nil) (js-transpile cbody))
|
||||
(else
|
||||
(list
|
||||
(js-sym "let")
|
||||
(list (list (js-sym pname) (list (js-sym "js-wrap-exn") raw-sym)))
|
||||
(js-transpile cbody))))))
|
||||
body-tr))))))
|
||||
(cond
|
||||
((= finally-part nil) with-catch)
|
||||
(else
|
||||
|
||||
Reference in New Issue
Block a user