Unverified Commit 84b33a25 authored by Merwane Bouri's avatar Merwane Bouri
Browse files

Ajout de NeighborhoodException

parent b96b5fc7
Pipeline #77805 passed with stages
in 17 seconds
......@@ -14,11 +14,22 @@ Cette classe représente le voisinage d'une cellule.
#include <vector>
#include <utility>
#include <string>
#include "coord.hpp"
using namespace std;
class NeighborhoodException : public std::exception
std::string _msg;
NeighborhoodException(const std::string& msg) : _msg(msg){}
virtual const char* what() const noexcept override
return _msg.c_str();
class Neighborhood {
//! \brief Vecteur de voisins contenant la position relative et l'état du voisin
......@@ -23,7 +23,7 @@ unsigned Neighborhood::getAt(Coord c) const
throw "Error Neighborhood::getAt";
throw NeighborhoodException("Error Neighborhood::getAt");
//return ERROR;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment