We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2b948b0 commit 48cf99cCopy full SHA for 48cf99c
src/main/clojure/cljs/closure.clj
@@ -181,10 +181,15 @@
181
(defn to-charset [charset]
182
(cond
183
(instance? Charset charset) charset
184
- (string? charset) (get string->charset (string/lower-case charset))
+ (and (string? charset)
185
+ (contains? string->charset (string/lower-case charset)))
186
+ (get string->charset (string/lower-case charset))
187
:else
188
(throw
- (ex-info (str "Invalid :closure-output-charset " charset) {}))))
189
+ (ex-info
190
+ (str "Invalid :closure-output-charset " charset " given, only "
191
+ (string/join ", " (keys string->charset)) " supported ")
192
+ {}))))
193
194
(defn set-options
195
"TODO: Add any other options that we would like to support."
0 commit comments