|
| Errortrap for dbase 5.0 for dos |
 |
Tue, 18 Dec 2007 15:52:43 -050 |
The default errror trap for dbase 5.0 for dos displays to the user the actual
code that caused the error along with other information. We are unable to
capture this information in our errortrap program. We have tried program(),
Lineno(), error(), message(). None of these returns the actual code that failed.
We have to manually look it up givin the iformation above.
Has anyone wrote an errortrap program that is as good as the default in
capturing the line of code that caused the error?
|
| Post Reply
|
| Re: Errortrap for dbase 5.0 for dos |
 |
Tue, 18 Dec 2007 18:53:57 -080 |
"Tom" <Tomwalz@walzeq.com> wrote in message
news:H0Z5vfbQIHA.1304@news-server...
> The default errror trap for dbase 5.0 for dos displays to the user the
> actual code that caused the error along with other information. We are
> unable to capture this information in our errortrap program. We have tried
> program(), Lineno(), error(), message(). None of these returns the actual
> code that failed. We have to manually look it up givin the iformation
> above.
> Has anyone wrote an errortrap program that is as good as the default in
> capturing the line of code that caused the error?
How are you using the functions that you mentioned, except for the obvious.
For example what do you do in your startup prg regarding error trapping?
Greg Hill
|
| Post Reply
|
| Re: Errortrap for dbase 5.0 for dos |
 |
Wed, 19 Dec 2007 10:55:47 -050 |
Greg Hill Wrote:
> "Tom" <Tomwalz@walzeq.com> wrote in message
> news:H0Z5vfbQIHA.1304@news-server...
> > The default errror trap for dbase 5.0 for dos displays to the user the
> > actual code that caused the error along with other information. We are
> > unable to capture this information in our errortrap program. We have
tried
> > program(), Lineno(), error(), message(). None of these returns the
actual
> > code that failed. We have to manually look it up givin the iformation
> > above.
> > Has anyone wrote an errortrap program that is as good as the default
in
> > capturing the line of code that caused the error?
>
> How are you using the functions that you mentioned, except for the
obvious.
> For example what do you do in your startup prg regarding error trapping?
>
> Greg Hill
>
>
Greg
Thanks for trying to help. At start up we replace the default error trap from
dbase with our own error trap program. We do this to control the users options
so they can not cancell out. We use the functions to dispay the error and then
decide what options we want to give the user.
It would be helpful to display the actual code of the line that caused the error
as the default error trap does. We can not figure out how dbase is doing it.
Tom
|
| Post Reply
|
| Re: Errortrap for dbase 5.0 for dos |
 |
Wed, 19 Dec 2007 14:01:31 -080 |
"Tom" <tomwalz@walzeq.com> wrote in message
news:JNbDfelQIHA.1892@news-server...
> Greg Hill Wrote:
>
>> "Tom" <Tomwalz@walzeq.com> wrote in message
>> news:H0Z5vfbQIHA.1304@news-server...
>> > The default errror trap for dbase 5.0 for dos displays to the user
the
>> > actual code that caused the error along with other information. We
are
>> > unable to capture this information in our errortrap program. We
have
>> > tried
>> > program(), Lineno(), error(), message(). None of these returns the
>> > actual
>> > code that failed. We have to manually look it up givin the
iformation
>> > above.
>> > Has anyone wrote an errortrap program that is as good as the
default in
>> > capturing the line of code that caused the error?
>>
>> How are you using the functions that you mentioned, except for the
>> obvious.
>> For example what do you do in your startup prg regarding error
trapping?
>>
>> Greg Hill
>>
>>
> Greg
>
> Thanks for trying to help. At start up we replace the default error trap
> from dbase with our own error trap program. We do this to control the
> users options so they can not cancell out. We use the functions to dispay
> the error and then decide what options we want to give the user.
> It would be helpful to display the actual code of the line that caused the
> error as the default error trap does. We can not figure out how dbase is
> doing it.
I needed to know how your code looks. I will show how I "think" did
it
"way" back in the then. My memory doesn't server me too well
sometimes.
In your startup code make sure that you have a line like the following
before anything else.
on error do errTrap with _lineno, error()
* or was it:
on error do errTrap with lineno(), program(), error()
Note: You will need to have a function in scope that accepts these
parameters. This way your on error code should give you the correct
information back.
If you call a procedure using ON ERROR dynamically, you will get the lineNo
of the procedure and not the true lineno of the error.
This info is best I can recall, it should get you started on the right path.
HTH
Greg Hill
|
| Post Reply
|
| Re: Errortrap for dbase 5.0 for dos |
 |
Thu, 20 Dec 2007 16:35:08 -050 |
Greg Hill Wrote:
> "Tom" <tomwalz@walzeq.com> wrote in message
> news:JNbDfelQIHA.1892@news-server...
> > Greg Hill Wrote:
> >
> >> "Tom" <Tomwalz@walzeq.com> wrote in message
> >> news:H0Z5vfbQIHA.1304@news-server...
> >> > The default errror trap for dbase 5.0 for dos displays to the
user the
> >> > actual code that caused the error along with other
information. We are
> >> > unable to capture this information in our errortrap program.
We have
> >> > tried
> >> > program(), Lineno(), error(), message(). None of these
returns the
> >> > actual
> >> > code that failed. We have to manually look it up givin the
iformation
> >> > above.
> >> > Has anyone wrote an errortrap program that is as good as the
default in
> >> > capturing the line of code that caused the error?
> >>
> >> How are you using the functions that you mentioned, except for the
> >> obvious.
> >> For example what do you do in your startup prg regarding error
trapping?
> >>
> >> Greg Hill
> >>
> >>
> > Greg
> >
> > Thanks for trying to help. At start up we replace the default error
trap
> > from dbase with our own error trap program. We do this to control the
> > users options so they can not cancell out. We use the functions to
dispay
> > the error and then decide what options we want to give the user.
> > It would be helpful to display the actual code of the line that caused
the
> > error as the default error trap does. We can not figure out how dbase
is
> > doing it.
>
> I needed to know how your code looks. I will show how I "think"
did it
> "way" back in the then. My memory doesn't server me too well
sometimes.
> In your startup code make sure that you have a line like the following
> before anything else.
>
> on error do errTrap with _lineno, error()
> * or was it:
> on error do errTrap with lineno(), program(), error()
>
> Note: You will need to have a function in scope that accepts these
> parameters. This way your on error code should give you the correct
> information back.
> If you call a procedure using ON ERROR dynamically, you will get the lineNo
> of the procedure and not the true lineno of the error.
> This info is best I can recall, it should get you started on the right
path.
>
> HTH
> Greg Hill
Greg
You are correct and our error trap does all of the above that you have suggested
correctly. The issue is that the default errortrap from dbase has a function()
that we can not do. We can not display the actual code of the line that caused
the error. Program(), error(), message(), and lineno() does not directly give
you this information. Do you know what function() the default errortrap uses
that displays the code?
Do you have access to the default errortrap code?
Tom
>
|
| Post Reply
|
|
|
|
|
|
|
|
|
|