* FAQ    * Search  * Register * Login 
Active topics
Unanswered topics

All times are UTC-06:00



Post new topic  Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Exception has been thrown by the target of an invocation...
PostPosted: Mon Jul 31, 2006 6:24 pm 
Offline
DBB Fleet Admiral
DBB Fleet Admiral
User avatar

Joined: Thu Nov 05, 1998 12:01 pm
Posts: 2700
Website: http://home.swbell.net/wa5czn/index1.html
Location: Oklahoma City, Oklahoma, United States of America
Yet another .Net error that doesn't say much.

In a \"Try...End Try\" block was attempting to catch the error in VB.Net:

Try
...Some Code...
Catch ex as exception
msgbox (ex.message.tostring)
End Try

- This link helped track it down:
http://www.geekpedia.com/Question70_Exception-has-been-thrown-by-the-target-of-an-invocation.html

Replaced the msgbox line with:

MessageBox.Show(ex.InnerException.Message)

The \"New Message\" revealed the routine that called the routine where the error was and the line in that routine where the error occurred.

Fixed the Offending Routine (Log File Routine) by encapulating it in a \"Try...End Try\" block.

Enjoy!

:)


Top
   
 Post subject:
PostPosted: Mon Jul 31, 2006 6:35 pm 
Offline
DBB Alumni
DBB Alumni
User avatar

Joined: Thu Nov 05, 1998 12:01 pm
Posts: 3545
Website: http://www.zazzle.com/tophertg*
AOL: TopherTheGreat2
Location: New York
Even better, can't you use Visual Studio, Debug -> Exceptions and break anytime an exception is thrown? This should give you the exact location of where the exception is coming from.


Top
   
 Post subject:
PostPosted: Fri Aug 04, 2006 6:52 pm 
Offline
DBB Fleet Admiral
DBB Fleet Admiral
User avatar

Joined: Thu Nov 05, 1998 12:01 pm
Posts: 2700
Website: http://home.swbell.net/wa5czn/index1.html
Location: Oklahoma City, Oklahoma, United States of America
I'll try that next time... Thanks Topher!

;)


Top
   
 Post subject:
PostPosted: Fri Aug 04, 2006 10:09 pm 
Offline
DBB Alumni
DBB Alumni
User avatar

Joined: Wed Mar 15, 2000 3:01 am
Posts: 8826
Location: Seattle
Doesn't the Locals window put the $exception on the stack so you can walk through it when your program breaks? Even less clicking :)


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 4 posts ] 

All times are UTC-06:00


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  



Descent'rs have piloted these pages
 
The layout and contents contained within this site are © DescentBB.net 1997-2006.
Descent, Descent II are © Parallax Software Corporation.
Descent III is Outrage Entertainment.
Descent is a Trademark of Interplay Productions.

Miner Wars™ is trademark of Keen Software House s. r. o.
.


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group