VERSION 1.0 CLASS BEGIN MultiUse = -1 'True Persistable = 0 'NotPersistable DataBindingBehavior = 0 'vbNone DataSourceBehavior = 0 'vbNone MTSTransactionMode = 0 'NotAnMTSObject END Attribute VB_Name = "StackTrace" Attribute VB_GlobalNameSpace = True Attribute VB_Creatable = True Attribute VB_PredeclaredId = False Attribute VB_Exposed = True Option Explicit 'NOTE: The purpose of the Initialize method in StackTrace isnt immediately obvious, 'since the Err object is a global variable. However, it appears that the client and server 'components do not share the same Err object, so, for example, assigning to Err.Number 'in one component doesnt affect the value in the other component. Consequently, we 'need to make sure its the clients Err object were checking in CTrackers Terminate 'event. To make things even more confusing, Err does behave like a shared variable 'when you run these components together in a project group. If in doubt, 'debug your components the old way, using separate instances of Visual Basic 'for the client and server. Public Sub Initialize(ByVal ErrorObject As ErrObject) Set GStacker.ClientErrObject = ErrorObject If RegOptions.DebugTrace Then GStacker.Tracing = True End If End Sub Public Function Enter(ModuleName As String, _ ProcName As String) As Tracker Set Enter = New Tracker Enter.Module = ModuleName Enter.Proc = ProcName If GStacker.Tracing Then GStacker.TraceMsg "Enter: " & ModuleName & "." & ProcName & SysResourcesGetWorkingSet End If End Function Public Sub Report(ModuleName As String, _ ProcName As String) GStacker.Report ModuleName, ProcName Me.Clear End Sub Public Sub Clear() GStacker.Clear End Sub ' Works best like this if the error handling is in a seperate DLL ' For internal use we have an quivalent in GStacker.bas Public Property Get GStackTrace() As StackTrace Set GStackTrace = Me End Property
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 11314 | Robert Cowham | Initial population of perforce_software version of P4OFC | ||
//guest/robert_cowham/perforce/P4OFC/main/p4comaddin/StackTrace.cls | |||||
#1 | 10843 | Robert Cowham |
Initial version of P4OFC source code. See README.txt (and LICENSE.txt and doc\P4OFC-Design.docx) |