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