FINERACT-1956: Add Antora skeleton structure and consolidate contributor guides

This commit is contained in:
airajena
2026-02-17 14:12:25 +01:00
committed by Aleksandar Vidakovic
parent 3e98cf791a
commit e4e0082872
22 changed files with 571 additions and 0 deletions
@@ -0,0 +1,22 @@
= Error Handling Guidelines
== Exception Handling
* **Log or Rethrow**: When catching exceptions, either rethrow them or log them. Include the root cause.
+
[source,java]
----
catch (SomeException e) {
throw new AnotherException("..details..", e);
// OR
LOG.error("...context...", e);
}
----
* **No Empty Catch Blocks**: Completely empty catch blocks are VERY suspicious. Do not "swallow" exceptions unless you are absolutely sure.
* Such "normal exceptions" are often indications of using the wrong API (e.g., throwing an exception for an expected condition instead of returning empty/optional).
* **Tests**: In tests, typically propagate exceptions (`throws SomeException`) so the test fails if it occurs.
* To test for an exception, use `Assert.assertThrows()`.
* **NullPointer**: Never catch `NullPointerException`. Fix the code instead.