Throw more specific exceptions and document them

I think `InvalidOperationException` instead of a plain `Exception` is a better fit here

/cc @Amrykid