Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 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: 573
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: 232
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: 573
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: Thu Apr 25 08:50:30 GMT 2024

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

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

Back to the top