Hello Imesha, 

       As user of curator, I guess this is because Curator suppose to
execute external code (like yours) and it does not know what type of the
exception it will throw in advance. If you define specific exception --
your code will be dependent on that and thus "hard dependency" arise. It
breaks DIP principle from SOLID
(https://en.wikipedia.org/wiki/SOLID_(object-oriented_design)) that is
not good. 

Vadim.

On 2016-11-21 09:12, Imesha Sudasingha wrote:

> Hi all, 
> 
> I was curious on why most of the methods in CURATORFRAMEWORK throw exceptions 
> of the type EXCEPTION which is the base class? In Zookeeper, they have 
> specific set of custom exceptions like ZooKeeperException and so on. Do you 
> have a specific reason for that? 
> 
> Thanks in advance! 
> 
> -Imesha
> -- 
> 
> IMESHA SUDASINGHA 
> Undergraduate of Department of Computer Science and  Engineering, 
> University of Moratuwa.
 

Reply via email to