WIP: EDMI: Improve Error Handling
This commit is contained in:
@@ -115,6 +115,9 @@ Public Class Form1
|
||||
|
||||
Private Async Sub ButtonLoadFile_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles ButtonLoadFile.ItemClick
|
||||
Try
|
||||
Dim oSWTotal As New Stopwatch()
|
||||
oSWTotal.Start()
|
||||
|
||||
If TextboxObejctId.EditValue = "" Then
|
||||
MsgBox("Please enter an object id!", MsgBoxStyle.Exclamation, "Uh oh!")
|
||||
End If
|
||||
@@ -126,9 +129,12 @@ Public Class Form1
|
||||
oResponse.FileContents.CopyTo(oMemoryStream)
|
||||
oMemoryStream.Position = 0
|
||||
|
||||
listboxLog.Items.Add("Stream read!")
|
||||
|
||||
DocumentViewer1.LoadFile(oResponse.FileName, oMemoryStream)
|
||||
|
||||
oSWTotal.Stop()
|
||||
listboxLog.Items.Add($"File [{oResponse.FileName}] loaded: [{FormatTime(oSWTotal.ElapsedMilliseconds)}]")
|
||||
Catch ex As FaultException
|
||||
MsgBox(ex.Reason.ToString, MsgBoxStyle.Critical, "Error from Service")
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.Critical, "Uh oh!")
|
||||
End Try
|
||||
|
||||
Reference in New Issue
Block a user