Bug #1494
closed
Catch potential exception in Faces
Added by Alex Afanasyev over 10 years ago.
Updated over 10 years ago.
Description
Constructing Data or Interest packet can potentially cause an exception (e.g., when outer TLV is well-formed, but there is a problem with inner TLVs).
This exception needs to be properly handled and Face should be terminated.
Actually. wireDecode for both Interest and Data can throw multiple different errors. For now, I would catch just std::runtime_error. Is there a problem with this?
- Tracker changed from Task to Bug
- Priority changed from Normal to High
Don't catch std::runtime_error. It's too broad.
Catch ndn::Tlv::Error, the base class of all wireDecode raised errors.
I think there could be other exceptions as well (it needs to be checked).
- Assignee set to Alex Afanasyev
- Status changed from New to Code review
- % Done changed from 0 to 100
- Status changed from Code review to Closed
Also available in: Atom
PDF