code: def beholder_ng(func):
      
      @functools.wraps(func)
      def behold(file, length, *args, **kwargs):
          seek_cur = file.tell()
          try:
              return func(file, length, *args, **kwargs)
          except Exception:
              # from pcapkit.foundation.analysis import analyse
              from pcapkit.protocols.raw import Raw
              error = traceback.format_exc(limit=1).strip().split(os.linesep)[-1]
              # error = traceback.format_exc()
  
              file.seek(seek_cur, os.SEEK_SET)
  
              # raw = Raw(file, length, error=str(error))
              # return analyse(raw.info, raw.protochain, raw.alias)
              next_ = Raw(file, length, error=error)
              return next_
      return behold
docs: Behold analysis procedure.