Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Identify inability to open a switch, avoid nil dereference
In the case where we cannot open a /dev/switchtecX device, give a useful panic message rather than just dereferencing a nil pointer. Earlier in the log there will be an error stating "Error opening path", and another stating "Failed to identify switch". The nil deference was happening much later, so it was not obviously connected to those. See NearNodeFlash/NearNodeFlash.github.io#178 for more details. Signed-off-by: Dean Roehrich <[email protected]>
- Loading branch information