Based on what you have revealed here, there is a problem in getExceptionMsg()
Java IO Exception handling
-
11-10-2022 - |
Question
when I debug the below code, there is an SmbException
and goes catch block line sb.append(pLogger.reportError(pStr, e));
, but it does not go into the method reportError()
.
what is the reason behind this. please advise if any changes.
try {
sfos = new SmbFileOutputStream(sFile);
} catch (SmbException e) {
sb.append(pLogger.rError(pathStr, e));
}
below is rError()
method
public String rError(String pxString,Exception e){
String errorToMailStr=null;
abcd="Verifying @ "+pxString+"::Error ["+e.getMessage()+"]";
logger.debug("Error when verifying @ "+pxString+":Error ["+gMsg(e)+"]");
return abcd;
}
at line logger.debug("Issue "+pxString+":Error ["+gMsg(e)+"]");
is going to below method and ends.
public abstract class ReflectiveCallable {
public Object run() throws Throwable {
try {
return runReflectiveCall();
} catch (InvocationTargetException e) {
throw e.getTargetException();
}
}
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow