Author |
Message
|
Shahid.Hussain |
Posted: Sun Oct 17, 2010 6:54 am Post subject: Question about InputExceptionList |
|
|
Novice
Joined: 18 Mar 2009 Posts: 13
|
Hi,
In my flow i am handling exception using the following code.
declare iError REFERENCE TO InputExceptionList.*[1];
WHILE iError.Number IS NOT NULL do
SET Environment.Variables.BrokerData.LastError.Text = iError.Text;
MOVE iError LASTCHILD;
END WHILE;
when i am getting error message i am not getting the same message as broker is putting in windows event log. for example if i don't handle exception broker puts the following message for some error.
<Error>A Custom Wire Format writing error occurred involving an incorrect data conversion. Element ''Country_Citizenship'' is either too long, or is out of range for the physical data type of ''fixed-length string''. </Error>
and using the exception handling i m getting this message on the last element.
<Error>CWF Data Overflow Error</Error>
is there any way to get the same error message as broker put in windows event log using exception handllig.
thanks in advance. |
|
Back to top |
|
 |
elvis_gn |
Posted: Sun Oct 17, 2010 8:55 am Post subject: |
|
|
 Padawan
Joined: 08 Oct 2004 Posts: 1905 Location: Dubai
|
Hi Shahid.Hussain,
Put a trace node before this exception handling and look at the InputExceptionList tree.
Compare the tree and go line by line of your while loop, you'll figure out why the same text is not getting captured.
Regards. |
|
Back to top |
|
 |
rekarm01 |
Posted: Sun Oct 17, 2010 4:13 pm Post subject: Re: Question about InputExceptionList |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 1415
|
Shahid.Hussain wrote: |
is there any way to get the same error message as broker put in windows event log using exception handling. |
The ExceptionList tree does not contain the full error message (with inserts).
The Java default-access method com.ibm.broker.plugin.MbService.getMessage() can return the full error message (with inserts), but it's not well-documented, and requires a Java Compute Node (or similar Java method) to access it.
There doesn't seem to be an equivalent function in ESQL (or the C Common API). |
|
Back to top |
|
 |
mqjeff |
Posted: Sun Oct 17, 2010 4:36 pm Post subject: Re: Question about InputExceptionList |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
To be clear to future readers, everything that is in the ExceptionList tree is the information that is used to build the error message, and the ExceptionList tree has complete information about the error at hand.
The only thing that is not in the ExceptionList is a flattened and localized "error message". |
|
Back to top |
|
 |
Amitha |
Posted: Wed Oct 20, 2010 1:42 pm Post subject: |
|
|
 Voyager
Joined: 20 Nov 2009 Posts: 80 Location: Newyork
|
Quote: |
The only thing that is not in the ExceptionList is a flattened and localized "error message". |
Hi mqjeff,
This is very informative. I was under the impression that exception list will have all the information. Can you please educate me what is flattened and localized error message.
Thanks |
|
Back to top |
|
 |
Vitor |
Posted: Wed Oct 20, 2010 2:48 pm Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Amitha wrote: |
I was under the impression that exception list will have all the information. |
As my associates have said, it does.
Amitha wrote: |
Can you please educate me what is flattened and localized error message. |
This is:
Quote: |
A Custom Wire Format writing error occurred involving an incorrect data conversion. Element ''Country_Citizenship'' is either too long, or is out of range for the physical data type of ''fixed-length string''. |
A message where all the inserts have been put in their proper places, and any regional adjustments made. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|