on 08-24-2011 8:56 AM
Hi,
Can anyone help me in providing me the UDF / java code to raise exceptions and fail the mapping.
I can do it by usinf string out of bound exception to fail the mapping ( which is one of the way).
But i need to invoke the exception clause to throw the custom message.
Can anyone please throw some light on this could be helpful..
Thanks,
Sneha
Hi Sneha,
You can use below code-
if (condition)
{ }
else throw new StreamTransformationException( "Custom Message");
Regards,
Amol
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sneha,
Please refer to the below blogs for this:
/people/alessandro.guarneri/blog/2006/01/26/throwing-smart-exceptions-in-xi-graphical-mapping
/people/michal.krawczyk2/blog/2007/04/26/xipi-throwing-generic-exceptions-from-any-type-of-mapping
Hope this is useful.
Regards,
Sanjeev.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sneha,
public String throwexception(String input, Container container) throws StreamTransformationException{
if(input.equals("ERROR"))
{
throw new RuntimeException("Mapping fail");
}
else
{
return input;
}
}
refer this
Also see,
Throwing Smart Exceptions in XI Graphical Mapping
/people/alessandro.guarneri/blog/2006/01/26/throwing-smart-exceptions-in-xi-graphical-mapping
XI/PI: Throwing Generic Exceptions from any type of Mapping
/people/michal.krawczyk2/blog/2007/04/26/xipi-throwing-generic-exceptions-from-any-type-of-mapping
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
11 | |
10 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.