]> git.sesse.net Git - casparcg/blobdiff - core/producer/binding.h
* Implemented supports for timeline marks in scene_producer. A mark is set on a speci...
[casparcg] / core / producer / binding.h
index 77e4261cb080774f2ca5cb1cea3c63bb33850359..20196fb344da632c5c2c4969c1d18d8c26e749a1 100644 (file)
@@ -33,6 +33,7 @@
 #include <boost/lexical_cast.hpp>
 
 #include <common/tweener.h>
+#include <common/except.h>
 
 namespace caspar { namespace core {
 
@@ -56,7 +57,7 @@ struct impl_base : std::enable_shared_from_this<impl_base>
                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;