NullErr.
Inheritance: Err
Ejemplo n.º 1
0
        public new static NullErr make(string msg, Err cause)
        {
            NullErr err = new NullErr();

            make_(err, msg, cause);
            return(err);
        }
Ejemplo n.º 2
0
 public static void setCur(Locale locale)
 {
     if (locale == null)
     {
         throw NullErr.make().val;
     }
     m_cur = locale;
 }
Ejemplo n.º 3
0
 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;
 }
Ejemplo n.º 4
0
 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);
 }
Ejemplo n.º 5
0
 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);
 }
Ejemplo n.º 6
0
        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();
        }
Ejemplo n.º 7
0
 public static void make_(NullErr self, string msg, Err cause)
 {
     Err.make_(self, msg, cause);
 }
Ejemplo n.º 8
0
 public static void make_(NullErr self, string msg)
 {
     make_(self, msg, null);
 }
Ejemplo n.º 9
0
 public static void make_(NullErr self)
 {
     make_(self, null);
 }
Ejemplo n.º 10
0
 public static new NullErr make(string msg, Err cause)
 {
     NullErr err = new NullErr();
       make_(err, msg, cause);
       return err;
 }
Ejemplo n.º 11
0
 public static void make_(NullErr self, string msg, Err cause)
 {
     Err.make_(self, msg, cause);
 }
Ejemplo n.º 12
0
 public static void make_(NullErr self, string msg)
 {
     make_(self, msg, null);
 }
Ejemplo n.º 13
0
 public static void make_(NullErr self)
 {
     make_(self, null);
 }