cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Mapping exceptions...

Former Member
0 Kudos

Hi ,

Can I build custom exceptions in message mapping. For e.g. Can I raise an exception if a certian field has a certian value?

I would appreciate it if you could provide with some Examples?

Arvind R

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Yes you can, please refer to the blog below:

XI/PI: Throwing Generic Exceptions from any type of Mapping

Throwing Smart Exceptions in XI Graphical Mapping

/people/alessandro.guarneri/blog/2006/01/26/throwing-smart-exceptions-in-xi-graphical-mapping

Regards.

Liang

Answers (2)

Answers (2)

henrique_pinto
Active Contributor
0 Kudos

you can have normal exception handling inside UDF, but if you throw any exceptions, you need to throw only RuntimeExceptions.

> if (a.equals("NOT_ALLOWED_VALUE")) {

> throw new RuntimeException("Not Allowed Value received.");

> }

Regards,

Henrique.

Former Member
0 Kudos

Hey

have a look at the below blog

/people/bhavesh.kantilal/blog/2006/07/25/triggering-xi-alerts-from-a-user-defined-function

Thanx

Aamir

Satyagadadas
Active Participant
0 Kudos

so simple

lets define one variable

String sValue = null;

and if everything fine assign some string value to sValue

if u need exception then try to return sValue..u ge exception and error outs the message