3 * Copyright 2006 Free Software Foundation, Inc.
5 * This file is part of GNU Radio
7 * GNU Radio is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2, or (at your option)
12 * GNU Radio is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License along
18 * with this program; if not, write to the Free Software Foundation, Inc.,
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
26 #include <mb_exception.h>
27 #include <mb_mblock.h>
31 mbe_base::mbe_base(mb_mblock *mb, const std::string &msg)
32 : logic_error(msg) // FIXME extract block class name and id and add to msg
36 mbe_not_implemented::mbe_not_implemented(mb_mblock *mb, const std::string &msg)
37 : mbe_base(mb, "Not implemented: " + msg)
41 mbe_no_such_component::mbe_no_such_component(mb_mblock *mb, const std::string &component_name)
42 : mbe_base(mb, "No such component: " + component_name)
47 mbe_duplicate_component::mbe_duplicate_component(mb_mblock *mb, const std::string &component_name)
48 : mbe_base(mb, "Duplicate component: " + component_name)
52 mbe_no_such_port::mbe_no_such_port(mb_mblock *mb, const std::string &port_name)
53 : mbe_base(mb, "No such port: " + port_name)
57 mbe_duplicate_port::mbe_duplicate_port(mb_mblock *mb, const std::string &port_name)
58 : mbe_base(mb, "Duplicate port: " + port_name)
62 mbe_already_connected::mbe_already_connected(mb_mblock *mb,
63 const std::string &comp_name,
64 const std::string &port_name)
65 : mbe_base(mb, "Port already connected: " + mb_util::join_names(comp_name, port_name))
71 mbe_incompatible_ports::mbe_incompatible_ports(mb_mblock *mb,
72 const std::string &comp1_name,
73 const std::string &port1_name,
74 const std::string &comp2_name,
75 const std::string &port2_name)
76 : mbe_base(mb, "Incompatible ports: "
77 + mb_util::join_names(comp1_name, port1_name) + " "
78 + mb_util::join_names(comp2_name, port2_name))
82 mbe_invalid_port_type::mbe_invalid_port_type(mb_mblock *mb,
83 const std::string &comp_name,
84 const std::string &port_name)
85 : mbe_base(mb, "Invalid port type for connection: " + mb_util::join_names(comp_name, port_name))