Menu

#53 File not found exception, when SDCARD is removed

v1.0_(example)
open
nobody
exception (1)
3
2018-02-10
2018-02-10
Anonymous
No

on C# using libpcap , SharpPcap 4.4.0 version

  • open eth0 device for capture.
  • write the received packets to a file using CaptureFileWriterDevice api.
  • the file which is being written using CaptureFileWriterDevice is located on device SDCARD.
  • while the capture is in progress , hard remove the SDCARD from the device
  • File not found exception is thrown from below stack trace , there is no way to catch this exception by the app.

expected:
to catch this exception at the app level, to handle this issue without crashing the app.

SharpPcap.LibPcap.LibPcapSafeNativeMethods.pcap_dispatch() in
SharpPcap.LibPcap.PcapDevice.CaptureThread() in
System.Threading.ThreadHelper.ThreadStart_Context(System.Threading.ThreadHelper state) in
System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Threading.ThreadHelper state, bool preserveSyncCtx) in
System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Threading.ThreadHelper state, bool preserveSyncCtx) in
System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Threading.ThreadHelper state) in
System.Threading.ThreadHelper.ThreadStart() in

Discussion

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB