X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=core%2Fproducer%2Fbinding.h;h=20196fb344da632c5c2c4969c1d18d8c26e749a1;hb=3b7401b41df8379e16e0ec1074121214fd27910e;hp=77e4261cb080774f2ca5cb1cea3c63bb33850359;hpb=44f608adff3740ae911192caa484ee06883913eb;p=casparcg diff --git a/core/producer/binding.h b/core/producer/binding.h index 77e4261cb..20196fb34 100644 --- a/core/producer/binding.h +++ b/core/producer/binding.h @@ -33,6 +33,7 @@ #include #include +#include namespace caspar { namespace core { @@ -56,7 +57,7 @@ struct impl_base : std::enable_shared_from_this auto self = shared_from_this(); if (dependency->depends_on(self)) - throw std::runtime_error("Can't have circular dependencies between bindings"); + CASPAR_THROW_EXCEPTION(invalid_argument() << msg_info("Can't have circular dependencies between bindings")); dependency->on_change(self, [=] { evaluate(); }); dependencies_.push_back(dependency); @@ -129,9 +130,7 @@ private: void set(T value) { if (bound()) - { - throw std::runtime_error("Bound value cannot be set"); - } + CASPAR_THROW_EXCEPTION(caspar_exception() << msg_info("Bound value cannot be set")); if (value == value_) return;