how to show exception message to the user?

1
0
-1

how to show exception message to the user? when task because of an error stops I want to show an error message

someone could help me, thanks.

for example this is the implementation of my connector:

  1. protected void executeBusinessLogic() throws ConnectorException{
  2. //Get access to the connector input parameters
  3. //getPath();
  4.  
  5. //TODO execute your business logic here
  6.  
  7. //WARNING : Set the output of the connector execution. If outputs are not set, connector fails
  8. //setStatus(status);
  9. //setMensaje(mensaje);
  10. try {
  11. File file = new File(getPath());
  12. InputStream is = new FileInputStream("D:\\Doc.docx");
  13. OutputStream out = new FileOutputStream(file);
  14. IOUtils.copy(is, out);
  15. setStatus(true);
  16.  
  17. } catch (final Exception e) {
  18. // TODO Auto-generated catch block
  19. setMensaje(e.getMessage());
  20. e.printStackTrace();
  21. }
  22. }
No answers yet.
Notifications