small bug in rising an exception