Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit d94ef73b authored by Michael KRISPER's avatar Michael KRISPER
Browse files

Report Progress in GUI: check to avoid thread exception

parent 912eba3d
No related branches found
No related tags found
No related merge requests found
...@@ -287,16 +287,14 @@ Imports VectoAuxiliaries ...@@ -287,16 +287,14 @@ Imports VectoAuxiliaries
' ReSharper disable once UnusedMember.Global -- used via Logging Framework! ' ReSharper disable once UnusedMember.Global -- used via Logging Framework!
Public Shared Sub LogMethod(level As String, message As String) Public Shared Sub LogMethod(level As String, message As String)
Try If VectoWorkerV3.IsBusy AndAlso Not VectoWorkerV3.CancellationPending Then
If level = "Warn" Then If level = "Warn" Then
VectoWorkerV3.ReportProgress(100, New VectoProgress With {.Target = "ListBoxWarning", .Message = message}) VectoWorkerV3.ReportProgress(100, New VectoProgress With {.Target = "ListBoxWarning", .Message = message})
ElseIf level = "Error" Or level = "Fatal" Then ElseIf level = "Error" Or level = "Fatal" Then
VectoWorkerV3.ReportProgress(100, New VectoProgress With {.Target = "ListBoxError", .Message = message}) VectoWorkerV3.ReportProgress(100, New VectoProgress With {.Target = "ListBoxError", .Message = message})
End If End If
Catch e As InvalidOperationException End If
End Try
End Sub End Sub
'Declaration mode GUI settings 'Declaration mode GUI settings
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment