Raise an exception if the conversion failed!

Adds code to the ruby wrapper to throw an exception if the conversion fails.