public static void setCur(Locale locale) { if (locale == null) { throw NullErr.make().val; } m_cur = locale; }
public static void make_(Err self, string msg, Err cause) { if (msg == null) { throw NullErr.make("msg is null").val; } self.m_msg = msg; self.m_cause = cause; }
public Map set(object key, object val) { modify(); if (key == null) { throw NullErr.make("key is null").val; } if (!isImmutable(key)) { throw NotImmutableErr.make("key is not immutable: " + @typeof(key)).val; } m_map[key] = val; return(this); }
public Map add(object key, object val) { modify(); if (key == null) { throw NullErr.make("key is null").val; } if (!isImmutable(key)) { throw NotImmutableErr.make("key is not immutable: " + @typeof(key)).val; } if (containsKey(key)) { throw ArgErr.make("Key already mapped: " + key).val; } m_map[key] = val; return(this); }
public static void make_(Actor self, ActorPool pool, Func receive) { // check pool if (pool == null) { throw NullErr.make("pool is null").val; } // check receive method if (receive == null && self.@typeof().qname() == "concurrent::Actor") { throw ArgErr.make("must supply receive func or subclass Actor").val; } if (receive != null && !receive.isImmutable()) { throw NotImmutableErr.make("Receive func not immutable: " + receive).val; } // init self.m_pool = pool; self.m_receive = receive; self.m_queue = new Queue(); }