Author |
Message
|
sebastia |
Posted: Fri Aug 31, 2007 2:44 am Post subject: THROW USER EXCEPTION |
|
|
 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 |
|
 |
Vitor |
Posted: Fri Aug 31, 2007 2:51 am Post subject: |
|
|
 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 |
|
 |
sebastia |
Posted: Fri Aug 31, 2007 3:04 am Post subject: |
|
|
 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 |
|
 |
Vitor |
Posted: Fri Aug 31, 2007 3:15 am Post subject: |
|
|
 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 |
|
 |
Vitor |
Posted: Fri Aug 31, 2007 3:18 am Post subject: |
|
|
 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 |
|
 |
sebastia |
Posted: Fri Aug 31, 2007 3:20 am Post subject: |
|
|
 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 |
|
 |
Vitor |
Posted: Fri Aug 31, 2007 3:22 am Post subject: |
|
|
 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 |
|
 |
mgk |
Posted: Fri Aug 31, 2007 6:01 am Post subject: |
|
|
 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 |
|
 |
sebastia |
Posted: Sat Sep 29, 2007 10:45 am Post subject: |
|
|
 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 |
|
 |
|