Skip to content

Commit

Permalink
Add error handling to table data export
Browse files Browse the repository at this point in the history
See #385
  • Loading branch information
joyfullservice committed Mar 14, 2023
1 parent 59dfb11 commit 06f9ffe
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Version Control.accda.src/modules/clsDbTableData.cls
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ Private Sub IDbComponent_Export(Optional strAlternatePath As String)
Dim strFile As String
Dim intFormat As eTableDataExportFormat

' Use error handling in case we encouter errors during export
If DebugMode(True) Then On Error GoTo 0 Else On Error Resume Next

' Save as selected format, and remove other formats if they exist.
For intFormat = 1 To eTableDataExportFormat.[_Last]
' Build file name for this format
Expand Down Expand Up @@ -72,6 +75,9 @@ Private Sub IDbComponent_Export(Optional strAlternatePath As String)
End If
Next intFormat

' Trap any errors while exporting table data.
CatchAny eelError, "Error exporting table data for " & m_Table.Name, ModuleName(Me) & ".Export"

End Sub


Expand Down

0 comments on commit 06f9ffe

Please sign in to comment.