GitHub user kevinjmh opened a pull request: https://github.com/apache/carbondata/pull/2878
[WIP] Modification of error/exception for better debugging Changes in this PR follows these rules: | Code Case | Problem | Suggest Modification | | -------- | -----: | :----: | | `LOGGER.error(e);` | no stack trace | `LOGGER.error(e.getMessage(), e);` | | `LOGGER.error(e.getMessage());` | no stack trace | `LOGGER.error(e.getMessage(), e);` | | `catch ... throw new Exception("Error occur")` | useless message, no stack trace | `throw new Exception(e)` | | `catch ... throw new Exception(e.getMessage())` | no stack trace | `throw new Exception(e)` | | `catch ... throw new Exception(e.getMessage(), e)` | no need to call `getMessage()` | `throw new Exception(e)` | | `catch ... throw new Exception("Error occur: " + e.getMessage(), e)` | useless message | `throw new Exception(e)` | | `catch ... throw new Exception("DataLoad fail: " + e.getMessage())` | no stack trace | `throw new Exception("DataLoad fail: " + e.getMessage(), e)` | Some exceptions, such as MalformedCarbonCommandException, InterruptException, NumberFormatException, InvalidLoadOptionException and NoRetryException, do not have Constructor using `Throwable`, so we do not change it Be sure to do all of the following checklist to help us incorporate your contribution quickly and easily: - [ ] Any interfaces changed? - [ ] Any backward compatibility impacted? - [ ] Document update required? - [ ] Testing done Please provide details on - Whether new unit test cases have been added or why no new tests are required? - How it is tested? Please attach test report. - Is it a performance related change? Please attach the performance test report. - Any additional information to help reviewers in testing this change. - [ ] For large changes, please consider breaking it into sub-tasks under an umbrella JIRA. You can merge this pull request into a Git repository by running: $ git pull https://github.com/kevinjmh/carbondata error_exception Alternatively you can review and apply these changes as the patch at: https://github.com/apache/carbondata/pull/2878.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #2878 ---- commit 78792ba19a0b09ca025818907777e708ca0ce4cc Author: Manhua <kevinjmh@...> Date: 2018-10-30T01:44:59Z LOGGER.error(e); ==> LOGGER.error(e.getMessage(), e); commit 4a7c58cab1f30178003e55b47978daf8d474fb31 Author: Manhua <kevinjmh@...> Date: 2018-10-30T01:48:33Z LOGGER.error(e.getMessage()); ==> LOGGER.error(e.getMessage(), e); commit dd42cba52500725265fbb0577702c79c2d138f6f Author: Manhua <kevinjmh@...> Date: 2018-10-30T01:50:24Z LOG.error(e); ==> LOG.error(e.getMessage(), e); commit b8716e8d33c7535d1698409bd91802f27d72890d Author: Manhua <kevinjmh@...> Date: 2018-10-30T02:01:29Z Exception(e.getMessage(), e); ==> Exception(e); commit f137aa7da667dcbfe867b5c83ebd6735b8c5f0f1 Author: Manhua <kevinjmh@...> Date: 2018-10-30T02:09:31Z Exception(e.getMessage()); ==> Exception(e); commit da0df82a9a43f54f7cf7072a4c3497a731ca261a Author: Manhua <kevinjmh@...> Date: 2018-10-30T02:18:37Z + e.getMessage()); ==> + e.getMessage(), e); commit 4c1ecaf636391327a57621721e2a5318fb8cc11f Author: Manhua <kevinjmh@...> Date: 2018-10-30T02:36:17Z fix style commit 26fa06c96aeaa7418424df6f5089315d95cfadbb Author: Manhua <kevinjmh@...> Date: 2018-10-30T02:53:22Z some more fix for .getMessage() ---- ---