Java Exception to String getErrorMessage(Exception ex)

Here you can find the source of getErrorMessage(Exception ex)

Description

Utility method to send the error back to UI

License

Open Source License

Parameter

Parameter Description
data a parameter
resp a parameter

Exception

Parameter Description
IOException an exception

Declaration

public static String getErrorMessage(Exception ex) throws IOException 

Method Source Code


//package com.java2s;
// Licensed under the Apache License, Version 2.0 (the "License");

import java.io.IOException;

public class Main {
    /**/*from ww  w .ja v  a2  s  .  c o m*/
     * Utility method to send the error back to UI
     * @param data
     * @param resp
     * @throws IOException
     */
    public static String getErrorMessage(Exception ex) throws IOException {
        return "Error:" + ex.toString();
    }
}

Related

  1. exceptionToString(Throwable e)
  2. exceptionToString(Throwable ex)
  3. exceptionToString(Throwable exception)
  4. exceptionTypeAndMsg(Exception e)
  5. exceptionWithCause(T exception, Throwable cause)
  6. getErrorMessage(Exception ex)
  7. getErrorMessage(Process process)
  8. getException(Exception e)
  9. getExceptionDetails(Exception e)