improve error message
This commit is contained in:
parent
b6f1e44ce0
commit
4c408043ec
1 changed files with 1 additions and 1 deletions
|
|
@ -1922,7 +1922,7 @@
|
|||
(let [invalid-typenames (filter #(try (c-layout (first %)) nil (catch Exception e (first %))) (partition 2 members))]
|
||||
(cond
|
||||
(odd? (count members)) (throw (Exception. "uneven amount of members supplied. members have to be typed and are required to be supplied in the form of `typename member-name`. the typename has to be coffi typename, like `:coffi.mem/int` or `[:coffi.mem/array :coffi.mem/byte 3]`"))
|
||||
(seq invalid-typenames) (throw (Exception. (str "invalid typename/s " (print-str invalid-typenames) ". typename has to be coffi typename, like `:coffi.mem/int` or `[:coffi.mem/array :coffi.mem/byte 3]`")))
|
||||
(seq invalid-typenames) (throw (Exception. (str "invalid typename/s " (print-str invalid-typenames) ". typename has to be coffi typename, like `:coffi.mem/int` or `[:coffi.mem/array :coffi.mem/byte 3]`. The type/s you referenced also might not be defined. In case of a custom type, ensure that you use the correctly namespaced keyword to refer to it.")))
|
||||
:else
|
||||
(let [coffi-typename (keyword (str *ns*) (str typename))
|
||||
typed-symbols (->>
|
||||
|
|
|
|||
Loading…
Reference in a new issue