示例#1
0
        private void HandleSqlError(SqlTypeException sqlTypeException)
        {
            ExTraceGlobals.ReportingWebServiceTracer.TraceError <string>(0L, "SqlTypeException. Message: {0}", sqlTypeException.Message);
            LocalizedException localizedException = SqlErrorHandler.TrasnlateError(sqlTypeException);

            this.TaskContext.WriteError(localizedException, ExchangeErrorCategory.ServerOperation, null);
        }
示例#2
0
        private void HandleSqlError(SqlException sqlException)
        {
            this.TraceSqlException(sqlException);
            if (SqlErrorHandler.IsObjectNotFoundError(sqlException))
            {
                this.TaskContext.WriteWarning(Strings.WarningReportNotAvailable);
                return;
            }
            LocalizedException localizedException = SqlErrorHandler.TrasnlateError(sqlException);

            this.TaskContext.WriteError(localizedException, ExchangeErrorCategory.ServerOperation, null);
        }
示例#3
0
        private void HandleSqlConnectionError(IDbConnection connection, SqlException sqlException)
        {
            this.TraceSqlException(sqlException);
            ExManagementApplicationLogger.LogEvent(ManagementEventLogConstants.Tuple_DataMartConnectionFailed, new string[]
            {
                connection.ConnectionString,
                sqlException.Number.ToString(CultureInfo.InvariantCulture),
                sqlException.Message
            });
            LocalizedException localizedException = SqlErrorHandler.TrasnlateConnectionError(sqlException);

            this.TaskContext.WriteError(localizedException, ExchangeErrorCategory.ServerOperation, null);
        }