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 » Parsing Exception Message

Post new topic  Reply to topic
 Parsing Exception Message « View previous topic :: View next topic » 
Author Message
pvemuri
PostPosted: Fri Jan 07, 2005 11:32 am    Post subject: Parsing Exception Message Reply with quote

Voyager

Joined: 05 Jan 2004
Posts: 83
Location: CA, USA

Hello all,
We have to parse the Exception message that come out of our Catch trminal of the Try catch node. Our error message needs to contain :

1. WBI error code
2. Error text. (reason for error / exception)
3. The node where the error occured.

I am able to get the above mentioned 3 components. But, I dont feel that my code gets enough information. (atleast interms of error text)

Can some one post any ESQL code that is used to parse the exception list and generate some informative error message.

Thanks,
Pvemuri.
Back to top
View user's profile Send private message Send e-mail
Nizam
PostPosted: Fri Jan 07, 2005 1:08 pm    Post subject: Reply with quote

Disciple

Joined: 10 Feb 2004
Posts: 160

pvemuri,
Use the visual debugger to see what is coming out of your catch terminal.
Expand the Exception list to know where the information you need is in the tree.
Then you can write your own code very easily.
Back to top
View user's profile Send private message
JT
PostPosted: Fri Jan 07, 2005 5:16 pm    Post subject: Reply with quote

Padawan

Joined: 27 Mar 2003
Posts: 1564
Location: Hartford, CT.

You might also consider extracting the Inserts from the ExceptionList tree, as they provide details regarding the error. The Inserts supply the values that are identified in the descrption of the BIP error.

Sample code to parse the ExceptionList is provided in the Toolkit Help facility. Click here
Back to top
View user's profile Send private message
kirani
PostPosted: Sat Jan 08, 2005 4:59 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

Can you post your code here?
_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
pvemuri
PostPosted: Sun Jan 09, 2005 3:54 pm    Post subject: Reply with quote

Voyager

Joined: 05 Jan 2004
Posts: 83
Location: CA, USA

Kiran.
I am using the same code provided in the Info center to grab the label number and error number.

Code:
-- Declare variable for the Error number extracted from exception list
DECLARE Error INTEGER;
-- Declare current path within the exception list
DECLARE Path CHARACTER;

-- Start at first child of exception list
SET Path = 'InputExceptionList.*[1]';

-- Loop until no more children
WHILE EVAL( 'FIELDNAME(' || Path || ') IS NOT NULL' ) DO

  -- Check if error number is available
  IF EVAL( 'FIELDNAME(' || Path || '.Number) IS NOT NULL' ) THEN
    -- Record only the deepest error number
    SET Error = EVAL( Path || '.Number' );
  END IF;

 -- Step to last child of current element (usually a nested exception list
 SET Path = Path || '.*[<]';

END WHILE;


Where as, I am trying to enhance my code so that It contains more detailed info. I am just curious if any one has developed a code taht captures more info and is more efficient. For example; My code captures the Label of the node where the error occurs and the error text.

The error text I am grabbing is the deepest "Text" field (non -null) in the exception list tree. But the other "Text" fields also provide some more useful info. But I just cannot grab all the "text" fields and append them into a single string (may be that will llok like Junk). All I want to know is , whether there is a pattern in the exception list where I can look for some particular fields.
Thanks,
Pvemuri.
Back to top
View user's profile Send private message Send e-mail
Nizam
PostPosted: Sun Jan 09, 2005 6:25 pm    Post subject: Reply with quote

Disciple

Joined: 10 Feb 2004
Posts: 160

pvemuri,
All the information about your exceptions that occured will be formatted in the exception list tree. You have to decide on your requirements for what to capture and format when an exception occurs.
I would suggest you to test your flows for all possible cases that can cause exceptions and see where the exception occurs. See what is set in the exception tree and know why the exception occurs.
If you already know what do when an exception occurs, post it here and somebody would help you.
Nyzam.
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 » Parsing Exception Message
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.