Solving problem with exception

The class exception do not exist, changing 'throw new exception' statements by 'throw new \Exception'.