Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » scout » [neon] IExceptionHandlerService.handleException() and ProcessingException.addContextMessage()
[neon] IExceptionHandlerService.handleException() and ProcessingException.addContextMessage() [message #1752729] Thu, 26 January 2017 14:57 Go to next message
Urs Beeli is currently offline Urs BeeliFriend
Messages: 567
Registered: October 2012
Location: Bern, Switzerland
Senior Member
In Mars there was the interface IExceptionHandlerService which offered handleException. This interface/class no longer exists in Neon and there is no mention in the Migration Guide on how to replace it.

Also, ProcessingException seems to no longer offer the addContextMessage() method.

Is there an easy way to convert the following code to Neon:
      try {
        // do stuff
      } catch (ProcessingException se) {
        se.addContextMessage("some message");
        BEANS.get(IExceptionHandlerService.class).handleException(se);
      }
Re: [neon] IExceptionHandlerService.handleException() and ProcessingException.addContextMessage() [message #1752734 is a reply to message #1752729] Thu, 26 January 2017 16:31 Go to previous messageGo to next message
Matthias Villiger is currently offline Matthias VilligerFriend
Messages: 126
Registered: September 2011
Senior Member
Hi Urs

There should be a method
org.eclipse.scout.rt.platform.exception.ProcessingException.withContextInfo(String, Object, Object...)


And a bean org.eclipse.scout.rt.platform.exception.ExceptionHandler with some special sub classes.

Are you looking for these?
Re: [neon] IExceptionHandlerService.handleException() and ProcessingException.addContextMessage() [message #1752875 is a reply to message #1752734] Mon, 30 January 2017 08:17 Go to previous message
Urs Beeli is currently offline Urs BeeliFriend
Messages: 567
Registered: October 2012
Location: Bern, Switzerland
Senior Member
Hi Matthias

It seems that ExceptionHandler will do. I can probably also convert addContextMessage() with withContextInfo(), though I'll have to come up with some "name" argument that was previously not needed.

Thanks, /urs
Previous Topic:[neon] Replacement for AbstractTableField.execUpdateTableStatus()
Next Topic:Custom Fields FormData
Goto Forum:
  


Current Time: Fri Nov 24 02:12:01 GMT 2017

Powered by FUDForum. Page generated in 0.01753 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software