예제 #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);
            }
        }