Results 1 to 5 of 5

Thread: question errorhandlig example

  1. #1

    Default 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 at 06:10 PM.

  2. #2
    Join Date
    Jan 2008
    Location
    Mohnton, PA USA (that's near Philadelphia)
    Posts
    2,148

    Default

    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

  3. #3

    Default

    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?

  4. #4
    Join Date
    Jan 2008
    Location
    Mohnton, PA USA (that's near Philadelphia)
    Posts
    2,148

    Default

    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.

  5. #5

    Default

    got it. thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •