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 » WebSphere Message Broker (ACE) Support » throwing an existing ExceptionList

Post new topic  Reply to topic
 throwing an existing ExceptionList « View previous topic :: View next topic » 
Author Message
Esa
PostPosted: Thu Dec 15, 2011 6:35 am    Post subject: throwing an existing ExceptionList Reply with quote

Grand Master

Joined: 22 May 2008
Posts: 1387
Location: Finland

I'm wondering if there is a simple way to throw an existing ExceptionList from a node wired from a failure terminal?
Back to top
View user's profile Send private message
inMo
PostPosted: Thu Dec 15, 2011 7:09 am    Post subject: Reply with quote

Master

Joined: 27 Jun 2009
Posts: 216
Location: NY

Search the help files for RESIGNAL. Does that meet your req?
Back to top
View user's profile Send private message
Esa
PostPosted: Thu Dec 15, 2011 7:31 am    Post subject: Reply with quote

Grand Master

Joined: 22 May 2008
Posts: 1387
Location: Finland

inMo wrote:
Search the help files for RESIGNAL. Does that meet your req?


No.

Cannot resignal without a signal.

In this case no exception has been thrown or caught yet. We are downstream from the node that detected the exception situation. There is an ExceptionList tree that represents the signal but it is in a form of a logical message tree and needs to be parsed (back?) into a throwable exception.
Back to top
View user's profile Send private message
mgk
PostPosted: Thu Dec 15, 2011 7:38 am    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1642

So, to do this you need to turn the ExceptionList back into an exception you can throw. The easiest way to do this today is to use the CreateExceptionFromExceptionList method in the new .NET API in V8. Alternatively, you can just throw a new exception that contains tha same information as the original ExceptionList...

Kind Regards,
_________________
MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions.
Back to top
View user's profile Send private message
Esa
PostPosted: Thu Dec 15, 2011 7:51 am    Post subject: Reply with quote

Grand Master

Joined: 22 May 2008
Posts: 1387
Location: Finland

mgk wrote:
So, to do this you need to turn the ExceptionList back into an exception you can throw. The easiest way to do this today is to use the CreateExceptionFromExceptionList method in the new .NET API in V8.


Nice. Will that be available in the java API as well? Anything else would be unfair

Unfortunately it does not help if you are running 6.1 on AIX...

mgk wrote:
Alternatively, you can just throw a new exception that contains tha same information as the original ExceptionList...


I think I see what you mean. I only need to copy the information from the last Exception in the tree (yes, and that should in fact be the only Exception in the list at that moment) and the rest of the stack will be build automatically as the exception is thrown upstream. That's it. Thanks, Matthew.
Back to top
View user's profile Send private message
Esa
PostPosted: Fri Dec 16, 2011 1:04 am    Post subject: Reply with quote

Grand Master

Joined: 22 May 2008
Posts: 1387
Location: Finland

Esa wrote:
mgk wrote:
Alternatively, you can just throw a new exception that contains tha same information as the original ExceptionList...


I think I see what you mean. I only need to copy the information from the last Exception in the tree (yes, and that should in fact be the only Exception in the list at that moment) and the rest of the stack will be build automatically as the exception is thrown upstream.


Actually, this does not solve the problem. What I would like to do is to add my own little nested exception to the exception represented as the ExceptionList and then throw it. The problem is that ESQL THROW only allows you to set exception severity, catalog, number and inserts. Several fields are also lost, including Type, Name and Label.

Sure I can copy the ExceptionList into Environment, throw my exception and rearrange the Exceptionlist in a generic exception handler. That's what I will have to do. But it is not a very sofisticated solution - I would rather throw a self-contained exception package.
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 » WebSphere Message Broker (ACE) Support » throwing an existing ExceptionList
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.