Use assert_raise instead of catch_error