In the above potion of code, the main line is the following
 
In the above potion of code, the main line is the following
 
  memcpy(to, packetbuf + hdrptr, PACKETBUF_HDR_SIZE - hdrptr);
 
  memcpy(to, packetbuf + hdrptr, PACKETBUF_HDR_SIZE - hdrptr);
Exception encountered, of type "Error"