// Called for messages and errors (ERROR and INFO tokens)
        internal override void MessagePosted(int number, byte state, byte errorClass, string server, string message, string procedure, int lineNumber)
        {
            if (null == _parent)
            {
                if (Bid.AdvancedOn)
                {
                    Bid.Trace("<sc.SmiEventSink_Default.MessagePosted|ADV> %d#, number=%d state=%d errorClass=%d server='%ls' message='%ls' procedure='%ls' linenumber=%d.\n",
                              0,
                              number,
                              state,
                              errorClass,
                              (null != server) ? server : "<null>",
                              (null != message) ? message : "<null>",
                              (null != procedure) ? procedure : "<null>",
                              lineNumber
                              );
                }
                SqlError error = new SqlError(number, state, errorClass, server, message, procedure, lineNumber);

                if (error.Class < TdsEnums.MIN_ERROR_CLASS)
                {
                    Warnings.Add(error);
                }
                else
                {
                    Errors.Add(error);
                }
            }
            else
            {
                _parent.MessagePosted(number, state, errorClass, server, message, procedure, lineNumber);
            }
        }