Skip to content
Advertisement

Tag: namespace-organisation

in which namespace / package to put exceptions?

What is the common or best practice to structure the location of your exception classes? Let’s say you have the packages/namespaces myproject.person (models and DAOs for persons) and myproject.order (models and DAOs for orders) and the exceptions PersonException and OrderException. Should I put the exceptions in their corresponding packages or in a separate package for exceptions (e.g. myproject.exceptions)? The first

Advertisement