Added exception handling to machines.all and rspecs