[ndnSIM] Exception boost::exception_detail::clone_impl<ns3::ndn::error::Name>

Alex Afanasyev alexander.afanasyev at ucla.edu
Mon Dec 2 12:10:35 PST 2013


Hi Isuru,

Most likely you're trying to create a name from an invalid URI.  You can get a more meaningful error if you catch boost::exception like this:

#include "ns3/ndnSIM/ndn.cxx/detail/error.h"

...

  try
    {
      ndn::Name test("invalid-URI-name--no-initial-slash");
      
    }
  catch (boost::exception &e)
    {
      if (const std::string *error = boost::get_error_info<ndn::error::msg> (e))
        {
          std::cerr << *error << std::endl;
        }
    }


---
Alex

On Dec 2, 2013, at 10:35 AM, <i.liyanage at surrey.ac.uk> <i.liyanage at surrey.ac.uk> wrote:

> Hi,
> 
> Is there any particular reason to throw following exception.
> 
> boost::exception_detail::clone_impl<ns3::ndn::error::Name> 
> 
> Many Thanks,
> Isuru
> _______________________________________________
> ndnSIM mailing list
> ndnSIM at lists.cs.ucla.edu
> http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20131202/56c0da57/attachment.html>


More information about the ndnSIM mailing list