Clojurescript에서 JavaScript 예외를 포착하려면 다음 코드 스니펫을 시도하십시오 -
(js/Error. "Oops") ;; throw error (throw (js/Error. "Error occurred!")) ;; catch error (try (throw (js/Error. "Erro occurred")) (catch js/Error e e)) ;; JavaScript allows to throw anything, but handle it with ClojureScript (try (throw (js/Error. "Error Occurred! ")) (catch :default e e))로 처리합니다.