Usecase ui code was not having logger to capture the exception trace. The same is fixed.
Issue-ID: USECASEUI-304
Signed-off-by: Isaac Manuel Raj <isaac.manuelraj@huawei.com>
Change-Id: I25ca93ba415c9bc30b3572f584e1fe9a09a53bf0
import java.util.List;
import java.util.Map;
+import com.google.common.base.Throwables;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
}
} catch (Exception e) {
logger.error("发送GET请求出现异常!" + e);
- e.printStackTrace();
+ logger.error("发送GET请求出现异常!" + Throwables.getStackTraceAsString(e));
}
// 使用finally块来关闭输入流
finally {
in.close();
}
} catch (Exception e2) {
- e2.printStackTrace();
+ logger.error("Exception occured while closing the connection {}" + Throwables.getStackTraceAsString(e2));
}
}
return result;
}
} catch (Exception e) {
logger.error("发送 POST 请求出现异常!"+e);
- e.printStackTrace();
+ logger.error("发送 POST 请求出现异常!"+Throwables.getStackTraceAsString(e));
}
//使用finally块来关闭输出流、输入流
finally{
import javax.servlet.http.HttpServletRequest;
+import com.google.common.base.Throwables;
import org.apache.commons.io.FileUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
}
} catch (IOException e) {
logger.error("exception occurred while performing UuiCommonUtil OutRequestBody.Details:"+ e.getMessage());
- e.printStackTrace();
+ logger.error("exception occurred while performing UuiCommonUtil OutRequestBody.Details:"+ Throwables.getStackTraceAsString(e));
}
return wholeStr;
}