X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Socket%2FSocketHandle.cti;h=39b32734aa07196df15eee2ac2306b701a58ed0e;hb=d2459b6c8249291588fd3d0d125ed3d38e003b55;hp=f059c56680449368e9eb6c31822ca058421eec11;hpb=c778649a04a9835ecaad9108b9613832d76c2d15;p=senf.git diff --git a/Socket/SocketHandle.cti b/Socket/SocketHandle.cti index f059c56..39b3273 100644 --- a/Socket/SocketHandle.cti +++ b/Socket/SocketHandle.cti @@ -1,8 +1,8 @@ // $Id$ // // Copyright (C) 2006 -// Fraunhofer Institute for Open Communication Systems (FOKUS) -// Competence Center NETwork research (NET), St. Augustin, GERMANY +// Fraunhofer Institute for Open Communication Systems (FOKUS) +// Competence Center NETwork research (NET), St. Augustin, GERMANY // Stefan Bund // // This program is free software; you can redistribute it and/or modify @@ -113,7 +113,7 @@ senf::SocketHandle::cast_dynamic(FileHandle handle) { // throws bad_cast if the body is not a SocketBody SocketBody & body (dynamic_cast(FileHandle::body(handle))); - // throws bad_cast if the policy is not compatible + // throws bad_cast if the policy is not compatible (already wrapped ...) SPolicy::checkBaseOf(body.protocol().policy()); return cast_static(handle); } @@ -138,7 +138,10 @@ prefix_ Target senf::dynamic_socket_cast(Source handle) boost::is_convertible::value && ( boost::is_convertible::value || boost::is_convertible::value ) )); - return Target::cast_dynamic(handle); + try { + return Target::cast_dynamic(handle); + } + SENF_WRAP_EXC(std::bad_cast) } template