Skip to content

Commit 17028c9

Browse files
committed
stdLambda equation and some stdError additions
1 parent 6994936 commit 17028c9

File tree

3 files changed

+23
-2
lines changed

3 files changed

+23
-2
lines changed

changelog.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,4 +345,6 @@ Before `08/07/2021` a change log was not kept. We have retrospectively gone back
345345
- 2025-06-11 `stdCOM` FEATURE - Added `PropertyStore_GetCount`, `PropertyStore_GetAt`, `PropertyStore_GetValue`, `PropertyStore_SetValue` and `PropertyStore_Commit` to work with `IPropertyStore`
346346
- 2025-06-23 `stdImage` FEATURE - Added `FindImage` to allow for automation through image searching. Thanks @KallunWillock!
347347
- 2025-06-24 `stdImage` FEATURE - Added `Typee`, `Width`, `Height`, `WidthBytes`, `Planes`, `BitsPixel` and `Bits` properties from `HBITMAP`. Thanks @Almesi!
348-
- 2025-06-25 `stdAcc` FIX - Fixed issue with `BFS` option in `FindFirst` and `FindAll`. Ultimately if the control is not present in the Accessibility group currently stdAcc can return a "Subscript out of range" error. This fix ensures that instead they simply return `nothing` (or an empty collection)
348+
- 2025-06-25 `stdAcc` FIX - Fixed issue with `BFS` option in `FindFirst` and `FindAll`. Ultimately if the control is not present in the Accessibility group currently stdAcc can return a "Subscript out of range" error. This fix ensures that instead they simply return `nothing` (or an empty collection)
349+
- 2025-06-26 `stdLambda` FEATURE - Added `Equation` property, which can be used to obtain the equation used to create the `stdLambda` object
350+
- 2025-06-26 `ALL` FEATURE - Added a new branch and a workflow to inject `stdError` stack tracing into all stdVBA class members.

src/WIP/stdError.cls

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,9 @@ Private Function SerializeArgs(ByRef args As Variant) As String
192192
SerializeArgs = sArgs
193193
End Function
194194

195+
'Serialize a value to a string representation.
196+
'@param value - The value to serialize.
197+
'@return - String representation of the value.
195198
Private Function Serialize(ByVal value As Variant) As String
196199
'Serialize the value to a string representation.
197200
select case VarType(value)
@@ -203,9 +206,19 @@ Private Function Serialize(ByVal value As Variant) As String
203206
Serialize = CStr(value)
204207
case vbDate
205208
Serialize = Format(value, "yyyy-mm-dd hh:nn:ss")
209+
case vbNull
210+
Serialize = "Null"
211+
case vbEmpty
212+
Serialize = "Empty"
206213
case vbObject
207214
'Serialize as #<Foo:0x00007ff9c18f7d10>
208-
Serialize = "#<" & TypeName(value) & ":" & Hex(ObjPtr(value)) & ">""
215+
If value Is Nothing Then
216+
Serialize = "Nothing"
217+
ElseIf TypeName(value) = "stdLambda" Then
218+
Serialize = "#<stdLambda" & ":" & Hex(ObjPtr(value)) & " Equation='" & value.Equation & "'>"
219+
Else
220+
Serialize = "#<" & TypeName(value) & ":" & Hex(ObjPtr(value)) & ">"
221+
End If
209222
Case vbError
210223
Serialize = "#Error!"
211224
case Else

src/stdLambda.cls

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,12 @@ Public Property Get oFunctExt() As Object
363363
Set oFunctExt = This.FunctionExtensions
364364
End Property
365365

366+
'Get the equation which was used to create the lambda
367+
'@returns - The equation used to create the lambda
368+
Public Property Get Equation() as String
369+
Equation = This.Equation
370+
End Property
371+
366372
'Implementation of stdICallable::Run
367373
'@param params as Array<Variant> - Parameters to run the lambda with
368374
'@returns - The result of the lambda

0 commit comments

Comments
 (0)