ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » General IBM MQ Support » http 500 skipping out of catch block

Post new topic  Reply to topic
 http 500 skipping out of catch block « View previous topic :: View next topic » 
Author Message
futuremqguruihope
PostPosted: Mon May 07, 2007 8:53 am    Post subject: http 500 skipping out of catch block Reply with quote

Novice

Joined: 18 Apr 2007
Posts: 10

Hi all I'm having the following issue in my VS 2003, .net framework 1.1, vb.net wsmq application and haven't been able to find a similar one addressed on the forum:

When I try to instantiate a queue manager and it fails, the exception is caught in the following block -

1. Catch ex As Exception

2. Dim mqexception As MQException
3. mqexception = CType(ex, MQException)
4. strResponse = ex.Message & " " & IIf(ex.InnerException Is Nothing, "", ex.InnerException.Message) & " " & mqexception.ReasonCode

5. End Try

Ideally, I would execute all the above lines and get a nice strResponse string. However, when I step through, lines 1 and 2 execute, and then I jumnp out of debugger and focus goes to the web page, which has been rerouted to an http 500 error page.

Does anyone know why lines 3-5 are skipped?

Thanks.
Back to top
View user's profile Send private message
futuremqguruihope
PostPosted: Mon May 07, 2007 9:04 am    Post subject: http 500 skipping out of catch block Reply with quote

Novice

Joined: 18 Apr 2007
Posts: 10

So I've discovered that the cast to mqexception is an invalid one, so that's throwing an exception.

So how do I access the mqexception.reasoncode? I can't catch these exceptions as mqexception for some reason. That's why after catching it as an exception, I'm casting it to an mqexception...

Any advice?
Back to top
View user's profile Send private message
futuremqguruihope
PostPosted: Mon May 07, 2007 9:54 am    Post subject: http 500 skipping out of catch block Reply with quote

Novice

Joined: 18 Apr 2007
Posts: 10

Got it! It appears I needed to do the cast as follows:

CType(ex, IBM.WMQ.MQException)

I'm not entirely sure why, though, since "Dim mqexception As MQException" had no problem, and thus MQException was in scope.

Oh well, hope this helps somebody else!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » http 500 skipping out of catch block
Jump to:  



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 vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.