Re: Err.Description does not contain the full text of the error me
- From: Chad Ullman <ChadUllman@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 19 Sep 2008 10:14:01 -0700
The libraries are all in VBScript. Here is another little snippet to
demonstrate the problem. In this case, we are explicitly redeclaring a
constant, which will throw an error. Again, when we wrap our execute call in
error handling, the error description is "Name redefined", but if we allow
WSH to handle it the error description is "Name redefined: 'FOO'". Once
again, the WSH default error handler surfaces more information then is
contained in the Err object
<code>
Option Explicit
On Error Resume Next
Const FOO = 1
Execute "Const FOO = 2"
If Err <> 0 Then
MsgBox Err.Description
Err = 0
End If
On Error Goto 0
Execute "Const FOO = 3"
</code>
"Richard Mueller [MVP]" wrote:
.
Are the libraries you refer to in another language, maybe something you
cannot alter? If an error is encountered it passes the error back to your
script, but you don't get a line number (except the line in your script)?
The discrepancy surprises me. I was not aware of it. I'm glad I have never
found a similar problem in VB, although this particular example cannot
happen in VB, as the code will not compile or run in debug until the error
this fixed. I can't think of any solution.
--
Richard Mueller
MVP Directory Services
Hilltop Lab - http://www.rlmueller.net
--
- Follow-Ups:
- Re: Err.Description does not contain the full text of the error me
- From: Todd Vargo
- Re: Err.Description does not contain the full text of the error me
- References:
- Err.Description does not contain the full text of the error messag
- From: Chad Ullman
- Re: Err.Description does not contain the full text of the error messag
- From: Pegasus \(MVP\)
- Re: Err.Description does not contain the full text of the error me
- From: Chad Ullman
- Re: Err.Description does not contain the full text of the error me
- From: Richard Mueller [MVP]
- Err.Description does not contain the full text of the error messag
- Prev by Date: Re: Err.Description does not contain the full text of the error me
- Next by Date: Re: Err.Description does not contain the full text of the error me
- Previous by thread: Re: Err.Description does not contain the full text of the error me
- Next by thread: Re: Err.Description does not contain the full text of the error me
- Index(es):
Relevant Pages
|