Here you can find the source of exceptionMsg2LocalizedStr(final Throwable e)
public static final String exceptionMsg2LocalizedStr(final Throwable e)
//package com.java2s; //License from project: Apache License import java.sql.SQLException; public class Main { public static final String exceptionMsg2LocalizedStr(final Throwable e) { if (e == null) return null; String message = e.getLocalizedMessage(); if (message == null) message = e.getClass().getName(); if (e instanceof SQLException) { SQLException nextException = ((SQLException) e).getNextException(); if (nextException != null) message += "\r\n" + exceptionMsg2str(nextException); }// w w w . j a va 2 s . c o m return message; } public static final String exceptionMsg2str(final Throwable e) { if (e == null) return null; String message = e.getMessage(); if (message == null) message = e.getClass().getName(); if (e instanceof SQLException) { SQLException nextException = ((SQLException) e).getNextException(); if (nextException != null) message += "\r\n" + exceptionMsg2str(nextException); } return message; } }