Improved Exceptions

Added DBiException and QueryException.