This commit is contained in:
1 parent
51a05fe4db
commit
f1e8907d40
2 files changed
+7
No files matched your search
@@ -2,6 +2,7 @@ using Microsoft.Data.Sqlite;
|
||||
using Microsoft.Win32;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Windows;
|
||||
|
||||
namespace Elwig.Services {
|
||||
@@ -147,6 +148,10 @@ namespace Elwig.Services {
|
||||
text += exc.Message + (showExcType ? $" ({exc.GetType().Name})" : "");
|
||||
if (exc.InnerException != null) text += "\n\n" + exc.InnerException.Message;
|
||||
}
|
||||
if (App.Config.Debug && exc.StackTrace != null) {
|
||||
var m = Regex.Match(exc.StackTrace, @"\\([^:\\]*):line ([0-9]+)");
|
||||
if (m != null) text += "\n\n" + m.Groups[1] + ": line " + m.Groups[2];
|
||||
}
|
||||
if (isError) {
|
||||
ShowError(title, text);
|
||||
} else {
|
||||
|
||||
@@ -172,6 +172,7 @@ namespace Elwig.Services {
|
||||
vm.StatusAreaCommitmentToolTip = null;
|
||||
|
||||
Utils.RunBackground("Mitgliederdaten laden", async () => {
|
||||
if (App.Current?.Dispatcher == null) return;
|
||||
using var ctx = new AppDbContext();
|
||||
|
||||
var d1 = ctx.Deliveries.Where(d => d.Year == Utils.CurrentLastSeason - 1 && d.MgNr == m.MgNr);
|
||||
@@ -222,6 +223,7 @@ namespace Elwig.Services {
|
||||
} else {
|
||||
vm.OrganicDetails = "...";
|
||||
Utils.RunBackground("Bio-Zertifikatsdaten laden", async () => {
|
||||
if (App.Current?.Dispatcher == null) return;
|
||||
var certs = await OrganicService.GetTracesCertificates(m);
|
||||
await App.Current.Dispatcher.BeginInvoke(() => {
|
||||
if (m.MgNr != vm.MgNr) return;
|
||||
|
||||
Reference in new issue
Block a user