Пример #1
0
 private void CheckPreviousError(bool safemode)
 {
     if (safemode)
     {
         Document err = this.Db.GetPreviousError();
         if (ErrorTranslator.IsError(err))
         {
             throw ErrorTranslator.Translate(err);
         }
     }
 }
Пример #2
0
        /// <summary>
        /// Checks the previous error.
        /// </summary>
        /// <param name="safemode">if set to <c>true</c> [safemode].</param>
        private void CheckPreviousError(bool safemode)
        {
            if (!safemode)
            {
                return;
            }

            var previousError = Database.GetPreviousError();

            if (ErrorTranslator.IsError(previousError))
            {
                throw ErrorTranslator.Translate(previousError);
            }
        }
Пример #3
0
        /// <summary>
        /// Checks the error.
        /// </summary>
        /// <param name="safemode">if set to <c>true</c> [safemode].</param>
        private void CheckError(bool safemode)
        {
            if (!safemode)
            {
                return;
            }

            var lastError = Database.GetLastError();

            if (ErrorTranslator.IsError(lastError))
            {
                throw ErrorTranslator.Translate(lastError);
            }
        }