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 » THROW USER EXCEPTION

Post new topic  Reply to topic
 THROW USER EXCEPTION « View previous topic :: View next topic » 
Author Message
sebastia
PostPosted: Fri Aug 31, 2007 2:44 am    Post subject: THROW USER EXCEPTION Reply with quote

Grand Master

Joined: 07 Oct 2004
Posts: 1003

I have to deal with some ESQL piece of code,
where the code detects a severe error condition
and goes like this :

IF ( Environment.NumDestinations = 0 ) THEN
THROW USER EXCEPTION MESSAGE 2950
VALUES('Not found (' || InputRoot.MQRFH2.COD || ') in Table.');
ELSE

My question is : WHERE CAN I FIND any kind of documentation
explaining how to raise "USER EXCEPTIONS" and its parameters ?

Thanks. S.
Back to top
View user's profile Send private message Visit poster's website
Vitor
PostPosted: Fri Aug 31, 2007 2:51 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Aside from the ESQL manual, where the THROW verb is documented?

That's so obvious, I'm clearly misunderstanding your question. Are you asking about user-defined message catalogs? Because 2950 is a pre-defined user code.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
sebastia
PostPosted: Fri Aug 31, 2007 3:04 am    Post subject: Reply with quote

Grand Master

Joined: 07 Oct 2004
Posts: 1003

mr Vitor : yes, I do have "ESQL" manual, version 6
and I am at page 252 exactly ...

====================================
MESSAGE is an optional clause; if you omit it, it defaults to the first message number of the block of messages provided for using THROW statements in WebSphere Message Broker catalog (2951). If you enter a message number in the THROW statement, you can use message numbers 2951 to 2999.

Alternatively, you can generate your own catalog by following the instructions in Using event logging from a user-defined extension. Use the optional VALUES field to insert data into your message. You can insert any number of pieces of information, but the messages supplied (2951 - 2999) cater for eight inserts only.

====================================

And I am wondering why the code contains message number 2950 ...

( sorry my question is not properly spelled ... )
Back to top
View user's profile Send private message Visit poster's website
Vitor
PostPosted: Fri Aug 31, 2007 3:15 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Interesting - My copy of the esql v6 manual has the THROW statement on page 199 and reads as follows:

Quote:
MESSAGE is an optional clause; if you omit it, it defaults to the first message
number of the block of messages provided for using THROW statements in
WebSphere Business Integration Message Broker catalog (2949). If you enter a
message number in the THROW statement, you can use message numbers 2949 to
2999. Alternatively, you can generate your own catalog.


You'll notice the number range is different to your version. Specifically this places 2950 in the user range when yours does not.

I suspect whoever coded 2950 had my copy of the manual not yours.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Aug 31, 2007 3:18 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Even more interestingly, the online infocentre has your text not mine.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
sebastia
PostPosted: Fri Aug 31, 2007 3:20 am    Post subject: Reply with quote

Grand Master

Joined: 07 Oct 2004
Posts: 1003

Yes - I do agree the coder had your text !!!

My book first page is
+++
WebSphere Message BrokerESQL Version 6 Release 0
+++

And I did like the old-style manuals that had Type-Number-Version codes,
as SG-2345-02 ...

()
Back to top
View user's profile Send private message Visit poster's website
Vitor
PostPosted: Fri Aug 31, 2007 3:22 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

AH HA!!!!!!

My v6 ESQL manual is in fact a cunningly disguised v5 manual! The fiend! It's part of a diabolical plot to make me look stupid!

A plot that will require very little effort.

I would theorise therefore that the flow in question was originally coded using v5 and the author picked the first available number in the user range (2950). This range moved in v6 and now that number isn't a user error.

Only a theory, but sounds plausable.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mgk
PostPosted: Fri Aug 31, 2007 6:01 am    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1642

Sounds like a good theory, but not quite correct. In fact the code picks 2951 as the "default" message number if one is not provided, and the docs reflect this number. However, the broker message catalog contains identical messages for the 2949 - 2999 range. So 2949 will work the same as 2951 or 2999. So there is no problem here with the message number...
_________________
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
sebastia
PostPosted: Sat Sep 29, 2007 10:45 am    Post subject: Reply with quote

Grand Master

Joined: 07 Oct 2004
Posts: 1003

Vitor :

I contacted via E-mail the original coder
( took one month almost )
and your conclusion is bright :

>>> the flow in question was originally coded using v5
and the author picked the first available number in the user range (2950).
This range moved in v6 and now that number isn't a user error.

==============================================
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » THROW USER EXCEPTION
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.