diff --git a/include/dynamic-graph/signal-caster.h b/include/dynamic-graph/signal-caster.h index 6d9dee19e6bf09420616cdf78cc9a55eab10feb7..1ad2b8493cfb179efd38dabcd84f04d5d9c70938 100644 --- a/include/dynamic-graph/signal-caster.h +++ b/include/dynamic-graph/signal-caster.h @@ -103,12 +103,7 @@ template<typename T> void signal_disp(const T& value, std::ostream& os) template<typename T> T signal_cast(std::istringstream& iss) { - try { - return boost::any_cast<T>(g_caster.cast(typeid(T), iss)); - } catch (...) { - throw ExceptionSignal(ExceptionSignal::GENERIC, - "Exception boost::any_cast"); - } + return boost::any_cast<T>(g_caster.cast(typeid(T), iss)); } template<typename T> void signal_trace(const T& value, std::ostream& os) diff --git a/include/dynamic-graph/signal.t.cpp b/include/dynamic-graph/signal.t.cpp index 0d00e7d2886ab8a7ab1c8f7c3358d872b1749a93..8d1f3ff1b8f96f4ae394fdc0a4ed479e6a0bef75 100644 --- a/include/dynamic-graph/signal.t.cpp +++ b/include/dynamic-graph/signal.t.cpp @@ -59,32 +59,14 @@ template< class T,class Time > void Signal<T,Time>:: set( std::istringstream& stringValue ) { - try - { - (*this) = signal_cast<T>( stringValue ); - } - catch DG_RETHROW - catch (...) - { DG_THROW ExceptionSignal( ExceptionSignal::SET_IMPOSSIBLE, - "Set operation not possible with this signal. ", - "(bad cast while setting %s).",this->getName().c_str()); - } - + (*this) = signal_cast<T>( stringValue ); } template< class T,class Time > void Signal<T,Time>:: get( std::ostream& os ) const { - try { signal_disp<T>( this->accessCopy(),os ); } - catch DG_RETHROW - catch (...) - { DG_THROW ExceptionSignal( ExceptionSignal::SET_IMPOSSIBLE, - "get operation not possible with this signal. ", - "(bad cast while getting value from %s).", - SignalBase<Time>::getName().c_str()); - } - + signal_disp<T>( this->accessCopy(),os ); } template< class T,class Time >