changed filter to throw a more specialized exception, like in the slides

Signed-off-by: greenTara <taraathan@gmail.com>