Skip to content

Commit

Permalink
ignore exception in destructor
Browse files Browse the repository at this point in the history
  • Loading branch information
kmaehashi committed Oct 20, 2018
1 parent ace169f commit fcc08f9
Showing 1 changed file with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,17 @@ Implements XIObject

#tag Method, Flags = &h21
Private Sub Destructor()
Dim f As Xojo.IO.FolderItem = Me.GetFolderItem()
If f.Exists() Then
f.Delete()
End If
Try
Dim f As Xojo.IO.FolderItem = Me.GetFolderItem()
If f.Exists() Then
f.Delete()
End If
Exception e As RuntimeException
// Ignore exceptions are we can do nothing here.
#if DebugBuild
Break
#endif
End Try
End Sub
#tag EndMethod

Expand Down

0 comments on commit fcc08f9

Please sign in to comment.