ER-103 Catch-blocks should log the exeption with Log4J.error("Context String" , exception )

Severity2
Enabledyes
Waivable
Configuration
Used logger class: org.apache.log4j.Category
operation: error	
Violation
try {
	InputStream is = new FileInputStream(fName);
	return is.read();
} catch (java.io.IOException e) {
	logger.error(FILE_ERROR_TXT, e);
	throw new HammurapiTestCasesException(e);
}
Fix
try {
	InputStream is = new FileInputStream(fName);
	return is.read();
} catch (java.io.IOException e) {
	logger.error(FILE_ERROR_TXT, e);
	throw new HammurapiTestCasesException(e);
}


Hammurapi 3 Copyright © 2004 Hammurapi Group. All Rights Reserved.