os/ossrv/ossrv_pub/boost_apis/boost/graph/exception.hpp
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/ossrv/ossrv_pub/boost_apis/boost/graph/exception.hpp	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,44 @@
     1.4 +//=======================================================================
     1.5 +// Copyright 2002 Indiana University.
     1.6 +// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek
     1.7 +//
     1.8 +// Distributed under the Boost Software License, Version 1.0. (See
     1.9 +// accompanying file LICENSE_1_0.txt or copy at
    1.10 +// http://www.boost.org/LICENSE_1_0.txt)
    1.11 +//=======================================================================
    1.12 +
    1.13 +#ifndef BOOST_GRAPH_EXCEPTION_HPP
    1.14 +#define BOOST_GRAPH_EXCEPTION_HPP
    1.15 +
    1.16 +#include <stdexcept>
    1.17 +#include <string>
    1.18 +
    1.19 +namespace boost {
    1.20 +
    1.21 +  struct bad_graph : public std::invalid_argument {
    1.22 +    bad_graph(const std::string& what_arg)
    1.23 +      : std::invalid_argument(what_arg) { }
    1.24 +  };
    1.25 +
    1.26 +  struct not_a_dag : public bad_graph {
    1.27 +    not_a_dag()
    1.28 +        : bad_graph("The graph must be a DAG.") { } 
    1.29 +  };
    1.30 +
    1.31 +  struct negative_edge : public bad_graph {
    1.32 +    negative_edge()
    1.33 +      : bad_graph("The graph may not contain an edge with negative weight."){ }
    1.34 +  };
    1.35 +
    1.36 +  struct negative_cycle : public bad_graph {
    1.37 +    negative_cycle()
    1.38 +      : bad_graph("The graph may not contain negative cycles.") { }
    1.39 +  };
    1.40 +  struct not_connected : public bad_graph {
    1.41 +    not_connected()
    1.42 +      : bad_graph("The graph must be connected.") { }
    1.43 +  };
    1.44 +
    1.45 +} // namespace boost
    1.46 +
    1.47 +#endif // BOOST_GRAPH_EXCEPTION_HPP