That looks good to me. I wasn't sure on whether raising an exception was desired behaviour - I'll update it.