Java代码中常见技术债务处理之Exception写在前面Exception handlers should preserve the original exceptionsDon’t directly use Exception and RuntimeExceptionExceptions should not be thrown in finally blocksChecked exceptions should not be thrownPublic methods should thro
写在前面异常处理是代码中常见的处理,本文根据SonarQube在异常方面的规则和常见检查结果,选取说明了常见异常处理中的技术债务,提倡技术债务最少的编码方式。Exception handlers should preserve the original exceptionsEither log or rethrow this exception. When handling a caught e