Hi Luis,
there might be a ?simple? solution to your problem; you could User Exit (USR0421N) to update the short error message description, as it is stored in FUSER.
When you want to “throw” the exception in your program you can read the error message (using USRN0320N) and update the description (using USRN0421N). I have not evaluated the advantages and disadvantages of doing so, but I’m sure you will. Some of the things to think about are:
1) What happens if more than one program wants to throw the same error? If several programs try to throw the same error (or actually do) then they might overwrite each other?s messages.
2) The solution to this would be for you to ensure that each error number is unique (and maybe tied to the program that is throwing the error), this will ensure that the program will be able to update the error message without problems . . . unless there is more than one instance of the same program running, which could mean that the various instances could potentially overwrite each other?s messages.
3) This leads me to think that you should try to devise a scheme by which the error number would be unique for each error instance being thrown. But again I can come up with several scenarios where you will run into limitations and possible conflicts.
4) Having stated the above, it appears that the solution is not nearly as simple or elegant as I initially would have liked.
I will give it some more thought and maybe you can too. Hopefully you will be able to come up with a scheme that works for you. When you first raised the question I also initially considered using NATRPC01, but it appears that the error message generated is written to the RPC trace. I could be mistaken and maybe someone who has more insight into NATRPC01 can shed some light on it.
Lastly, the more I think about it the more it makes sense to keep things simple. A simple and easy solution might be the best approach; the initial method of providing the exception message directly within a field as the end of the RPC call structure might be your best bet. Do you have specific objections to this method?
Regards
Theo
#EntireX#webMethods#Mainframe-Integration