HighTechTalks DotNet Forums  

VBScript not getting Exception details

Dotnet Framework (Remoting) microsoft.public.dotnet.framework.remoting


Discuss VBScript not getting Exception details in the Dotnet Framework (Remoting) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
James
 
Posts: n/a

Default VBScript not getting Exception details - 03-07-2007 , 09:21 PM






I have a remoting object hosted in a Windows Service. One of the clients is a
VBScript that invokes a proxy CCW dll. The script gets all
ApplicationException details but no system exception (Exception,SqlException
etc) details.

An example error message displayed has:

Error: System error.
Code: 80131904
Source: .Net SqlClient Data Provider.

On the server I can see the correct information. A .net client gets the
correct information as well.

If I wrap the exception in an Application Exception by
catch (Exception ex)
{
throw new ApplicationException(ex.Message, ex);
}
VBScript gets the error message correctly.

How can I get the correct exception details in a VBScript?

Reply With Quote
  #2  
Old   
Peter Bradley
 
Posts: n/a

Default Re: VBScript not getting Exception details - 03-08-2007 , 03:20 AM






Does VBScript understand exceptions? I didn't think it did. Why are you
using VBScript?

However, since I'd rather have my hand cut off than "program" in VBScript, I
could very well be totally incorrect about what VBScript can and can't do.


Peter

"James" <James (AT) discussions (DOT) microsoft.com> wrote

Quote:
I have a remoting object hosted in a Windows Service. One of the clients is
a
VBScript that invokes a proxy CCW dll. The script gets all
ApplicationException details but no system exception
(Exception,SqlException
etc) details.

An example error message displayed has:

Error: System error.
Code: 80131904
Source: .Net SqlClient Data Provider.

On the server I can see the correct information. A .net client gets the
correct information as well.

If I wrap the exception in an Application Exception by
catch (Exception ex)
{
throw new ApplicationException(ex.Message, ex);
}
VBScript gets the error message correctly.

How can I get the correct exception details in a VBScript?



Reply With Quote
  #3  
Old   
James
 
Posts: n/a

Default Re: VBScript not getting Exception details - 03-08-2007 , 02:24 PM



Peter,

VBScript is not the intended client. It just happens that a legacy
application uses VB scripts to get things done in an area where rules change
almost everyday. VB scripts allows them to change that part of the
application to be very dynamic.

The application that uses these VB scripts are written in C++ (unmanaged).

VB scripts do not understand exceptions but the err object mostly gets all
exception information, I guess, through the GetLastError API. .NET runtime
sets the last error when exception occurs upon calls from a COM object.

Thanks.
James

"Peter Bradley" wrote:

Quote:
Does VBScript understand exceptions? I didn't think it did. Why are you
using VBScript?

However, since I'd rather have my hand cut off than "program" in VBScript, I
could very well be totally incorrect about what VBScript can and can't do.


Peter

"James" <James (AT) discussions (DOT) microsoft.com> wrote in message
news:658F1ADD-688E-465B-9EE0-88350442EDFA (AT) microsoft (DOT) com...
I have a remoting object hosted in a Windows Service. One of the clients is
a
VBScript that invokes a proxy CCW dll. The script gets all
ApplicationException details but no system exception
(Exception,SqlException
etc) details.

An example error message displayed has:

Error: System error.
Code: 80131904
Source: .Net SqlClient Data Provider.

On the server I can see the correct information. A .net client gets the
correct information as well.

If I wrap the exception in an Application Exception by
catch (Exception ex)
{
throw new ApplicationException(ex.Message, ex);
}
VBScript gets the error message correctly.

How can I get the correct exception details in a VBScript?




Reply With Quote
  #4  
Old   
Peter Bradley
 
Posts: n/a

Default Re: VBScript not getting Exception details - 03-09-2007 , 02:59 AM



Seems you've answered your own question, then, haven't you?

Cheers


Peter

"James" <James (AT) discussions (DOT) microsoft.com> wrote

Quote:
Peter,

VBScript is not the intended client. It just happens that a legacy
application uses VB scripts to get things done in an area where rules
change
almost everyday. VB scripts allows them to change that part of the
application to be very dynamic.

The application that uses these VB scripts are written in C++ (unmanaged).

VB scripts do not understand exceptions but the err object mostly gets all
exception information, I guess, through the GetLastError API. .NET runtime
sets the last error when exception occurs upon calls from a COM object.

Thanks.
James

"Peter Bradley" wrote:

Does VBScript understand exceptions? I didn't think it did. Why are you
using VBScript?

However, since I'd rather have my hand cut off than "program" in
VBScript, I
could very well be totally incorrect about what VBScript can and can't
do.


Peter

"James" <James (AT) discussions (DOT) microsoft.com> wrote in message
news:658F1ADD-688E-465B-9EE0-88350442EDFA (AT) microsoft (DOT) com...
I have a remoting object hosted in a Windows Service. One of the clients
is
a
VBScript that invokes a proxy CCW dll. The script gets all
ApplicationException details but no system exception
(Exception,SqlException
etc) details.

An example error message displayed has:

Error: System error.
Code: 80131904
Source: .Net SqlClient Data Provider.

On the server I can see the correct information. A .net client gets the
correct information as well.

If I wrap the exception in an Application Exception by
catch (Exception ex)
{
throw new ApplicationException(ex.Message, ex);
}
VBScript gets the error message correctly.

How can I get the correct exception details in a VBScript?






Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.