Changed 'return error' to 'raise error'.