Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > VB Script

Vista - Re: Err.Description does not contain the full text of the error me

Reply
 
Old 09-18-2008   #1 (permalink)
mayayana


 
 

Re: Err.Description does not contain the full text of the error me


Quote:

> So again, does anyone know why the level of detail is different in the WSH
> error dialog and the VBScript Err Object?
>
The WSH message is a debugging message.
Err.Description is just that: the description
text of the specific error that was triggered.

Not to be insulting, but I think that should
be pretty obvious. You shouldn't have a
"variable is not defined" error once the script
is finished and in use. By the time you've
finished debugging you should generally know what
errors might happen and have them dealt with by
the script.
In other words, in the finished script you shouldn't
be getting unexpected errors. If you do then you
need to go back to debugging.



My System SpecsSystem Spec
Old 09-18-2008   #2 (permalink)
Al Dunbar


 
 

Re: Err.Description does not contain the full text of the error me


"mayayana" <mayaXXyana@xxxxxx> wrote in message
news:Of7DTpfGJHA.5028@xxxxxx
Quote:

>
>
Quote:

>> So again, does anyone know why the level of detail is different in the
>> WSH
>> error dialog and the VBScript Err Object?
>>
>
> The WSH message is a debugging message.
> Err.Description is just that: the description
> text of the specific error that was triggered.
>
> Not to be insulting, but I think that should
> be pretty obvious. You shouldn't have a
> "variable is not defined" error once the script
> is finished and in use. By the time you've
> finished debugging you should generally know what
> errors might happen and have them dealt with by
> the script.
> In other words, in the finished script you shouldn't
> be getting unexpected errors. If you do then you
> need to go back to debugging.
Yes, I prefer that my robust and well-debugged scripts encounter only those
errors that are expected. ;-)

/Al


My System SpecsSystem Spec
Old 09-19-2008   #3 (permalink)
mayayana


 
 

Re: Err.Description does not contain the full text of the error me

Quote:

> Unlesss you can answer that question I'll thank you to not make any more
> insulting assumptions and facetious replies.
>
My apologies for trying your patience.
Let me try again, more simply:

Errors have numbers and descriptive text.

Err.Description is that descriptive text.

The msgbox you see is the WSH debugger
showing you that descriptive text and telling
you the context.

If you post more detail about what problem you
actually need to solve then you might get a more
helpful answer.


My System SpecsSystem Spec
Old 09-19-2008   #4 (permalink)
mayayana


 
 

Re: Err.Description does not contain the full text of the error me

> Yes, I prefer that my robust and well-debugged scripts encounter only
those
Quote:

> errors that are expected. ;-)
>
Did you think my response was "highhanded"?
I can't think of any time I've ever dealt with Err.Description
outside of a debugging situation, except when I write
something like a class for use by others and want to
provide custom error feedback. But of course that's
also used in a debugging situation on their end. Once the
script is in use I might have something like:

If Err.Number <> 0 then....

But if I encounter an error that my script hasn't
prepared for then it's time for debugging again.
I was tryinng to point out that the description
isn't really applicable outside of debugging. No
one would do something like:

If Err.Description = "Object can't create object." then...

Even less likely would be:

If Instr(Err.Description, "Object can't create object") > 0 then
If Instr(Err.Description, "foo") > 0 then
MsgBox "Foo just fooed up.", 64, "Snazzy Script Feedback"
End If
End If



My System SpecsSystem Spec
Old 09-20-2008   #5 (permalink)
Al Dunbar


 
 

Re: Err.Description does not contain the full text of the error me


"mayayana" <mayaXXyana@xxxxxx> wrote in message
news:uZ1FvolGJHA.4560@xxxxxx
Quote:
Quote:

>> Yes, I prefer that my robust and well-debugged scripts encounter only
> those
Quote:

>> errors that are expected. ;-)
>>
>
> Did you think my response was "highhanded"?
No. The expected/unexpected error thing is just one of my pet oxymorons...
;-)

/Al

<snip>


My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Full Text Search Issue Live Mail
Error:0xc00d0026: no error description available" General Discussion
Need full line of text from select-string PowerShell
how to get text string from description? PowerShell
Full text search in Vista Vista General


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46