Skip to main content



      Home
Home » Eclipse Projects » Eclipse Scout » [neon] IExceptionHandlerService.handleException() and ProcessingException.addContextMessage()
[neon] IExceptionHandlerService.handleException() and ProcessingException.addContextMessage() [message #1752729] Thu, 26 January 2017 09:57 Go to next message
Eclipse UserFriend
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 11:31 Go to previous messageGo to next message
Eclipse UserFriend
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 03:17 Go to previous message
Eclipse UserFriend
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: Wed Nov 12 20:53:47 EST 2025

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

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

Back to the top