Skip to content

Convert thrown? clauses to handle CLJS and Clojure JVM#43

Merged
jeaye merged 1 commit intojank-lang:mainfrom
dgr:dgr-convert-exceptions
Jan 18, 2025
Merged

Convert thrown? clauses to handle CLJS and Clojure JVM#43
jeaye merged 1 commit intojank-lang:mainfrom
dgr:dgr-convert-exceptions

Conversation

@dgr
Copy link
Contributor

@dgr dgr commented Jan 18, 2025

This converts (is (thrown? Exception ...)) clauses to (is (thrown? #?(:cljs :default :default Exception) ...)) to properly catch any sort of Javascript exception in Clojurescript.

@jeaye jeaye merged commit b1d6e6a into jank-lang:main Jan 18, 2025
2 of 3 checks passed

(is #?@(:cljs [(= false (zero? nil))]
:default [(thrown? Exception (zero? nil))]))
:default [(thrown? #?(:cljs :default :default Exception) (zero? nil))]))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needed?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, but this conversion was automated. I saw it during the review, as well, but didn't think it was worth more iteration.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea, I'm going through and catching some of those by hand. I'll try to do a deeper, file-by-file pass.

@dgr dgr deleted the dgr-convert-exceptions branch January 19, 2025 22:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants