Beispiel #1
0
        public void SetError(int devID, ErrorEnvironment env)
        {
            if (!_body.ContainsKey(devID))
            {
                _body.Add(devID, 0);
            }

            if (++_body[devID] > _errorLimit)
            {
                var ex = new IOException("Error in data transmission.");
                ex.Data.Add("DeviceID", devID);
                ex.Data.Add("ErrorType", env.ErrorType);
                ex.Data.Add("Package", env.Package);
                throw ex;
            }
        }
Beispiel #2
0
        public void SetError(int devID, ErrorEnvironment env)
        {
            if (!_body.ContainsKey(devID))
                _body.Add(devID, 0);

            if (++_body[devID] > _errorLimit) {
                var ex = new IOException("Error in data transmission.");
                ex.Data.Add("DeviceID",  devID);
                ex.Data.Add("ErrorType", env.ErrorType);
                ex.Data.Add("Package", env.Package);
                throw ex;
            }
        }