This is a pleasure to read.
-
Private Sub aLabel_AfterLabelEdit(Cancel As Integer, NewString As String) '+++ VB/Rig Begin Push +++ Const VBRIG_PROC_ID_STRING = "+aLabel_AfterLabelEdit" Dim VBRigErr As Long, VBRigErrMsg As String If VBRig.Trap_TrapsEnabled Then On Error GoTo aLabel_AfterLabelEdit_VBRigErr End If Call VBRig_Error(VBRIG_PUSH_PROC_STACK, 0, "", VBRIG_MODULE_ID_STRING, VBRIG_PROC_ID_STRING) '+++ VB/Rig End +++ Cancel = True '+++ VB/Rig Begin Pop +++ Call VBRig_Error(VBRIG_POP_PROC_STACK, 0, "", VBRIG_MODULE_ID_STRING, VBRIG_PROC_ID_STRING) Exit Sub
-
Private Sub aLabel_AfterLabelEdit(Cancel As Integer, NewString As String) '+++ VB/Rig Begin Push +++ Const VBRIG_PROC_ID_STRING = "+aLabel_AfterLabelEdit" Dim VBRigErr As Long, VBRigErrMsg As String If VBRig.Trap_TrapsEnabled Then On Error GoTo aLabel_AfterLabelEdit_VBRigErr End If Call VBRig_Error(VBRIG_PUSH_PROC_STACK, 0, "", VBRIG_MODULE_ID_STRING, VBRIG_PROC_ID_STRING) '+++ VB/Rig End +++ Cancel = True '+++ VB/Rig Begin Pop +++ Call VBRig_Error(VBRIG_POP_PROC_STACK, 0, "", VBRIG_MODULE_ID_STRING, VBRIG_PROC_ID_STRING) Exit Sub
0. Find the person who write this code. 1. Work out were they live. 2. Break into the home. 3. LEave a severed head in his head.
Panic, Chaos, Destruction. My work here is done.
-
Private Sub aLabel_AfterLabelEdit(Cancel As Integer, NewString As String) '+++ VB/Rig Begin Push +++ Const VBRIG_PROC_ID_STRING = "+aLabel_AfterLabelEdit" Dim VBRigErr As Long, VBRigErrMsg As String If VBRig.Trap_TrapsEnabled Then On Error GoTo aLabel_AfterLabelEdit_VBRigErr End If Call VBRig_Error(VBRIG_PUSH_PROC_STACK, 0, "", VBRIG_MODULE_ID_STRING, VBRIG_PROC_ID_STRING) '+++ VB/Rig End +++ Cancel = True '+++ VB/Rig Begin Pop +++ Call VBRig_Error(VBRIG_POP_PROC_STACK, 0, "", VBRIG_MODULE_ID_STRING, VBRIG_PROC_ID_STRING) Exit Sub
It looks surprisingly similar to the code you posted two days ago under the heading "Where's Waldo".
-
It looks surprisingly similar to the code you posted two days ago under the heading "Where's Waldo".
-
Yes, only this one was even a bigger horror especially since it only has one line of code that does anything & it's not even something that could raise an error. It's positively lovely.
I've seen this error rig code before. Sage Software has a utility in their MAS500 SDK that you can run to add error handle to all functions and subs that generates code very similar to this. There is no way anyone is hand writing that much error handling for "Cancel = True".
-
I've seen this error rig code before. Sage Software has a utility in their MAS500 SDK that you can run to add error handle to all functions and subs that generates code very similar to this. There is no way anyone is hand writing that much error handling for "Cancel = True".
Yeah, I think this was a plug in which added this mess to all new functions/subs. They've since stopped using it, but it's still as one fugly mug when you see it, especially in something like this. Were I given a free reign, I'd be all over the my delete button right now.
-
Private Sub aLabel_AfterLabelEdit(Cancel As Integer, NewString As String) '+++ VB/Rig Begin Push +++ Const VBRIG_PROC_ID_STRING = "+aLabel_AfterLabelEdit" Dim VBRigErr As Long, VBRigErrMsg As String If VBRig.Trap_TrapsEnabled Then On Error GoTo aLabel_AfterLabelEdit_VBRigErr End If Call VBRig_Error(VBRIG_PUSH_PROC_STACK, 0, "", VBRIG_MODULE_ID_STRING, VBRIG_PROC_ID_STRING) '+++ VB/Rig End +++ Cancel = True '+++ VB/Rig Begin Pop +++ Call VBRig_Error(VBRIG_POP_PROC_STACK, 0, "", VBRIG_MODULE_ID_STRING, VBRIG_PROC_ID_STRING) Exit Sub
-
Private Sub aLabel_AfterLabelEdit(Cancel As Integer, NewString As String) '+++ VB/Rig Begin Push +++ Const VBRIG_PROC_ID_STRING = "+aLabel_AfterLabelEdit" Dim VBRigErr As Long, VBRigErrMsg As String If VBRig.Trap_TrapsEnabled Then On Error GoTo aLabel_AfterLabelEdit_VBRigErr End If Call VBRig_Error(VBRIG_PUSH_PROC_STACK, 0, "", VBRIG_MODULE_ID_STRING, VBRIG_PROC_ID_STRING) '+++ VB/Rig End +++ Cancel = True '+++ VB/Rig Begin Pop +++ Call VBRig_Error(VBRIG_POP_PROC_STACK, 0, "", VBRIG_MODULE_ID_STRING, VBRIG_PROC_ID_STRING) Exit Sub
-
This is a horror indeed, but one thing puzzles me:
Wes Jones wrote:
On Error GoTo aLabel_AfterLabelEdit_VBRigErr
Does VB support "long jumps" or sth? I don't see a
aLabel_AfterLabelEdit_VBRigErr
anywhere...Greetings - Jacek
-
This code looks like it was generated by an automated tool for injecting error handling code.