Skip to content

Commit

Permalink
Show error message if .NET is not available
Browse files Browse the repository at this point in the history
fixes #2024
  • Loading branch information
ErikEJ committed Nov 30, 2023
1 parent 49d40d9 commit ac65557
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions src/GUI/Shared/Handlers/ReverseEngineer/ReverseEngineerHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -453,10 +453,25 @@ private async Task<bool> LoadDataBaseObjectsAsync(ReverseEngineerOptions options
{
await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync();

await VS.StatusBar.StartAnimationAsync(StatusAnimation.Build);
var predefinedTables = !string.IsNullOrEmpty(options.Dacpac)
? await GetDacpacTablesAsync(options.Dacpac, options.CodeGenerationMode)
: await GetTablesAsync(dbInfo, options.CodeGenerationMode, options.Schemas?.ToArray());
IEnumerable<TableModel> predefinedTables = null;

try
{
await VS.StatusBar.StartAnimationAsync(StatusAnimation.Build);

predefinedTables = !string.IsNullOrEmpty(options.Dacpac)
? await GetDacpacTablesAsync(options.Dacpac, options.CodeGenerationMode)
: await GetTablesAsync(dbInfo, options.CodeGenerationMode, options.Schemas?.ToArray());
}
catch (InvalidOperationException ex)
{
VSHelper.ShowError($"{ex.Message}");
return false;
}
finally
{
await VS.StatusBar.EndAnimationAsync(StatusAnimation.Build);
}

var isSqliteToolboxInstalled = options.DatabaseType != DatabaseType.SQLite;

Expand Down

0 comments on commit ac65557

Please sign in to comment.