added return to getDocument() exception