throw an error instead of returning false

Emmanuel asked for the fromString function to throw errors instead of returning
false.