Added some errorhandling to the first methods in databae controller and added a new class exceptions, if we find it useful to define some exceptions of our own.