diff src/StaticDicts/StaticDicts.jl @ 737:ca4f17efb279 feature/static_dict

Change to using DomainError
author Jonatan Werpers <jonatan@werpers.com>
date Wed, 17 Mar 2021 21:47:16 +0100
parents b5d9fbcdcef1
children e716602f1d62
line wrap: on
line diff
--- a/src/StaticDicts/StaticDicts.jl	Wed Mar 17 21:45:59 2021 +0100
+++ b/src/StaticDicts/StaticDicts.jl	Wed Mar 17 21:47:16 2021 +0100
@@ -25,7 +25,7 @@
 
     function StaticDict{K,V,N}(pairs::Tuple) where {K,V,N}
         if !allunique(first.(pairs))
-            throw(ArgumentError("keys must be unique (for now)"))
+            throw(DomainError(pairs, "keys must be unique"))
         end
         return new{K,V,N}(pairs)
     end