Ejemplo n.º 1
0
        internal static string ShowErrors(Exception ex)
        {
#if V35
            ISqlCeHelper sqlCeHelper = new SqlCeHelper();
#else
            ISqlCeHelper sqlCeHelper = new SqlCeHelper4();
#endif
            Telemetry.TrackException(ex);
            return(sqlCeHelper.FormatError(ex));
        }
Ejemplo n.º 2
0
        internal static string SendError(Exception ex, DatabaseType dbType, bool report = true)
        {
            if (ex != null)
            {
                var dontTrack = ex.GetType().Name == "SqlCeException" ||
                                ex is SqlException ||
                                ex is SQLiteException;

                if (!dontTrack)
                {
                    Telemetry.TrackException(ex);
                }
                EnvDTEHelper.ShowError(CreateEngineHelper(dbType).FormatError(ex));
            }
            return(string.Empty);
        }