我有一个代码片段在我的代码块下printStackTrace()
使用时抛出错误。catch
以下是代码片段。
try
{
# Debug Code added on 19 Feb 2016
logger.log(Level.INFO, "baseDNs[i] = "+baseDNs[i]);
logger.log(Level.INFO, "search ="+search);
logger.log(Level.INFO, "attributes = "+attributes);
it = basicCmAgent.find_managed_objects(baseDNs[i], search, attributes);
}
catch(Exception e)
{
# Debug Code added on 19 Feb 2016
logger.log(Level.SEVERE, "Caught Error : "+e.printStackTrace());
logger.log(Level.WARNING, "Could not find managed objects with base DN " + baseDNs[i]);
return false;
}
以下是错误:
asses/xml-apis.jar:../3pp_libraries/cxa_classes/irp3gppR99_330_j140.jar -d lib com/ericsson/nms/temip/importer/BasicCmConnection.java
com/ericsson/nms/temip/importer/BasicCmConnection.java:177: 'void' type not allowed here
logger.log(Level.SEVERE, "Caught Error : " +e.printStackTrace());
^
Note: ./com/ericsson/nms/temip/importer/BasicCmConverter.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
*** Error exit code 1
Stop.
*** Error exit code 1
Stop.
我怎样才能解决这个问题?