-
Notifications
You must be signed in to change notification settings - Fork 188
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement logging and enhance error handling
The code was updated to include a more refined approach to error management through the implementation of logging in the LazyErrorMessageTest and ProcessDictionary classes. Additionally, the way files are processed was changed to throw unchecked exceptions instead of merely printing stack traces. A new test file, MapTest, was created to test iteration over a map.
- Loading branch information
Showing
3 changed files
with
33 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package lambdas; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
import java.util.Map; | ||
|
||
public class MapTest { | ||
|
||
@Test | ||
void iterateOverMap() { | ||
Map.of("a", 1, "b", 2, "c", 2) | ||
.forEach((k, v) -> System.out.println(k + " -> " + v)); | ||
} | ||
} |