class CurrentUser {

    public static String getUser() {
        String user = getUserInternal();
        if (user == null) {
            throw new IllegalStateException("No user logged into the system");
        } else {
            return user;
        }
    }

}