Chris@16: //======================================================================= Chris@16: // Copyright 2002 Indiana University. Chris@16: // Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek Chris@16: // Chris@16: // Distributed under the Boost Software License, Version 1.0. (See Chris@16: // accompanying file LICENSE_1_0.txt or copy at Chris@16: // http://www.boost.org/LICENSE_1_0.txt) Chris@16: //======================================================================= Chris@16: Chris@16: #ifndef BOOST_GRAPH_EXCEPTION_HPP Chris@16: #define BOOST_GRAPH_EXCEPTION_HPP Chris@16: Chris@16: #include Chris@16: #include Chris@16: Chris@16: namespace boost { Chris@16: Chris@16: struct bad_graph : public std::invalid_argument { Chris@16: bad_graph(const std::string& what_arg) Chris@16: : std::invalid_argument(what_arg) { } Chris@16: }; Chris@16: Chris@16: struct not_a_dag : public bad_graph { Chris@16: not_a_dag() Chris@16: : bad_graph("The graph must be a DAG.") Chris@16: { } Chris@16: }; Chris@16: Chris@16: struct negative_edge : public bad_graph { Chris@16: negative_edge() Chris@16: : bad_graph("The graph may not contain an edge with negative weight.") Chris@16: { } Chris@16: }; Chris@16: Chris@16: struct negative_cycle : public bad_graph { Chris@16: negative_cycle() Chris@16: : bad_graph("The graph may not contain negative cycles.") Chris@16: { } Chris@16: }; Chris@16: Chris@16: struct not_connected : public bad_graph { Chris@16: not_connected() Chris@16: : bad_graph("The graph must be connected.") Chris@16: { } Chris@16: }; Chris@16: Chris@16: struct not_complete : public bad_graph { Chris@16: not_complete() Chris@16: : bad_graph("The graph must be complete.") Chris@16: { } Chris@16: }; Chris@16: Chris@16: } // namespace boost Chris@16: Chris@16: #endif // BOOST_GRAPH_EXCEPTION_HPP