[RUBY-32] improve exception hierarchy and documentation