Kumologica: Exception Handling In Specific Nodes of a Flow [Video]
Exception handling support in Kumologica flows.
Join the DZone community and get the full member experience.Join For Free
Although every programmer intends to write code that executes without any errors, a robust implementation of any logic should account for any exceptional scenarios that might occur during program execution. An exception is an event that occurs during the execution of a program and that disrupts the normal flow of instructions. And a graceful handling of such exceptional scenarios is very important because it maintains the normal, desired flow of a program even when an unexpected event occurs.
If exceptions are not handled properly, it results in the undesired state of execution of the program. Hence, it is expected from any language/product that it provides a robust but at the same time, developer and implementation friendly setup for exception handling.
Kumologica provides very good and robust support for handling exceptions that might occur during the flow execution. It is imperative that every flow has a good exception handling implementation so that the flow has a graceful exit and provides a meaningful response in the instance that an unexpected event occurs.
In this video, I will show you how to handle exceptions in flows using the Kumologica catch node. The catch node is used for capturing exceptions from the flow.
The demo will have a function node throwing an error, and the corresponding implementation of the catch node for handling the error event and providing a graceful exit with a meaningful response to the request.
If the error event was not handled properly, it would have resulted in the runtime exiting with an error.
Opinions expressed by DZone contributors are their own.