Replaced all the throws with throws of actual C++ exceptions and documented all of them

Signed-off-by: Toon Schoenmakers <nighteyes1993@gmail.com>