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);
        }
        protected void LogSqlException(string query, SqlTypeException sqlEx)
        {
            try
            {
                Trace.CorrelationManager.StartLogicalOperation(_type);

                Trace.TraceError("Sql query failed: {0}", query);

                Trace.TraceError(sqlEx.ToString());
            }
            finally
            {
                Trace.CorrelationManager.StopLogicalOperation();
            }
        }
Beispiel #3
0
 public static LocalizedException TrasnlateError(SqlTypeException sqlException)
 {
     return(new InvalidDataException(sqlException.Message, sqlException));
 }