fpmas 1.6
exceptions.h
Go to the documentation of this file.
1#ifndef FPMAS_MODEL_EXCEPTIONS_API_H
2#define FPMAS_MODEL_EXCEPTIONS_API_H
3
10
11namespace fpmas { namespace api { namespace model {
12
17 class OutOfFieldException : public std::domain_error {
18 public:
24 OutOfFieldException(const char* what)
25 : std::domain_error(what) {}
26 };
27
33 public:
45 std::string("Cell ") + fpmas::to_string(cell_id)
46 + " is out of the mobility range of Agent "
47 + fpmas::to_string(agent_id)).c_str()) {}
48
62 std::string("Point ") + fpmas::to_string(cell_point)
63 + " is out of the mobility range of Agent "
64 + fpmas::to_string(agent_id) + ", currently located on "
65 + fpmas::to_string(agent_location)).c_str()) {}
66 };
67}}}
68#endif
Definition: distributed_id.h:89
Definition: exceptions.h:17
OutOfFieldException(const char *what)
Definition: exceptions.h:24
OutOfMobilityFieldException(fpmas::api::graph::DistributedId agent_id, fpmas::api::model::DiscretePoint agent_location, fpmas::api::model::DiscretePoint cell_point)
Definition: exceptions.h:57
OutOfMobilityFieldException(fpmas::api::graph::DistributedId agent_id, fpmas::api::graph::DistributedId cell_id)
Definition: exceptions.h:41
Definition: fpmas.cpp:3
std::string to_string(const api::graph::DistributedId &id)
Definition: distributed_id.cpp:4