Error Handling
Posted: Fri Nov 12, 2004 5:29 pm
Hi all
Using PDS 7.1 + MASM on Dos boxes
Trying to come up with an alternative to the "ON ERROR"
Currently every routine has the following,
'---------------------------------
Sub SomeName
OldRoutine = Routine
Routine = 1234
'
' body of routine
'
'
Routine = OldRoutine
End Sub
'---------------------------------
So when an error happens, I know where it happens and can select the
correct response.
My trouble is the overhead and speed degradation caused by basic's error
handling.Speed is very important as I am running up to 50 processes
at one time.
I have experimented with various methods, but none give the kind of
improvement that I am looking for. For example if I run my program with
all error handling disabled, the program runs faster.
So, one idea would be if I intercepted the dos error handler that causes the
program to halt and use a lookup (table or file) to see where the error
happened.
I know many programmers use extensive error checking at each instruction that can cause an error,
but that will create an enormous amount of overhead.
Of course I check for errors at the obvious file open's etc.
Does anybody have any ideas on this. I dont want written code, just ideas.
Regards from down under.
Using PDS 7.1 + MASM on Dos boxes
Trying to come up with an alternative to the "ON ERROR"
Currently every routine has the following,
'---------------------------------
Sub SomeName
OldRoutine = Routine
Routine = 1234
'
' body of routine
'
'
Routine = OldRoutine
End Sub
'---------------------------------
So when an error happens, I know where it happens and can select the
correct response.
My trouble is the overhead and speed degradation caused by basic's error
handling.Speed is very important as I am running up to 50 processes
at one time.
I have experimented with various methods, but none give the kind of
improvement that I am looking for. For example if I run my program with
all error handling disabled, the program runs faster.
So, one idea would be if I intercepted the dos error handler that causes the
program to halt and use a lookup (table or file) to see where the error
happened.
I know many programmers use extensive error checking at each instruction that can cause an error,
but that will create an enormous amount of overhead.
Of course I check for errors at the obvious file open's etc.
Does anybody have any ideas on this. I dont want written code, just ideas.
Regards from down under.