Announcement Announcement Module
Collapse
No announcement yet.
question errorhandlig example Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • question errorhandlig example

    Hello,
    I'm looking at the errorHandling example.
    In case of error, below method is called
    Code:
    public void onInvitationFailed(Invitation inv) {
    		logger.info("Host received failure notification for: " + inv);
    	}
    If I want to get error message(i.e exception detail or cause) also with payload(Invitation), how can I do that?

    thanks
    Last edited by techluver; Aug 22nd, 2011, 06:10 PM.

  • #2
    Well, there are many ways and it all depends on how your Message flow is wired. You may want to provide more information and/or configuration, but before you do that I'd also suggest to look at some samples. For example: https://github.com/SpringSource/spri.../errorhandling

    Comment


    • #3
      thanks oleg. I have already looked at the example, but could not find what I'm looking for. can you please let me know what changes we need to do error handling example to get both payload and exception details?

      Comment


      • #4
        ErrorMessage contains MessagingException as a payload which itself has an attribute 'failedMessage' which contains an original Message. So when you receive an ErrorMessage you have all the info you need.

        Comment


        • #5
          got it. thanks

          Comment

          Working...
          X