Use Configure class in Database class

And throw exceptions to server.